This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC: structure typedef compilation error
- From: "Aniket S Joshi" <aniketsj at myw dot ltindia dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 26 Mar 2004 17:54:53 +0530
- Subject: GCC: structure typedef compilation error
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