GCC structure compilation error
Aniket S Joshi
aniketsj@myw.ltindia.com
Fri Mar 26 12:39:00 GMT 2004
Hi All,
pls find description of problem below
File1.h
typedef struct Modules_Prescence
{
uint16 Mccb1_Present;
uint16 Mccb2_Present;
uint16 Mccb3_Present;
uint16 Mccb4_Present;
uint16 Io_Mccb1_Present;
uint16 Io_Mccb2_Present;
uint16 Io_Mccb3_Present;
uint16 Io_Mccb4_Present;
uint16 Voltage_Power_Module_Present;
}MODULES;
typedef struct Database_Display
{
SERIAL_DISPLAY Settings_Display;
SERIAL_POWER Settings_Power;
SERIAL_VOLTAGE Settings_Voltage;
SERIAL_MCCB Settings_Mccb_Display;
SYSTEM_IOMOD Settings_IoModule_Display[4];
MODULES Modules_Present;
CALENDER Settings_RTC;
uint16 ProgDone;
ALARM_MCCB Alarm_Status ;
TRIP_MCCB Trip_Status ;
}DATABASE_DISPLAY;
file2.c
#include "file1.h"
DATABASE_DISPLAY Database_DISPLAY;
// code start
:
:
if(Database_DISPLAY.Modules_Present.Mccb2_Present==1)
{
}
:
After compiling file2. c
i am getting following errors like
file2.c:10: error: request for member 'Module_Present' in something not a structure or union
pls help me solve this problem
Thanks in advance
Aniket
More information about the Gcc-help
mailing list