public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: GCC structure compilation error
@ 2004-03-26 17:10 Robert Wimmer
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Wimmer @ 2004-03-26 17:10 UTC (permalink / raw)
  To: aniketsj, gcc-help


>typedef struct Database_Display
>{
>...
>   MODULES Modules_Present;
>....
>}DATABASE_DISPLAY;
>
>file2.c
>#include "file1.h"
>DATABASE_DISPLAY Database_DISPLAY;
>// code start
>:
>
>file2.c:10: error: request for member 'Module_Present' in something not a 
>structure or union
>
>pls help me solve this problem

'Module_Present' is no member of database_disp.... >  it is defined as 
MODULES Modules_Present;
(an 's' is missing)

bye sepp

_________________________________________________________________
Die MSN Suche - Kategorien helfen Ihnen dabei, präzise Ergebnisse zu 
erhalten. http://search.msn.at/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GCC structure compilation error
  2004-03-26 12:39 Aniket S Joshi
@ 2004-03-26 12:44 ` Eljay Love-Jensen
  0 siblings, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2004-03-26 12:44 UTC (permalink / raw)
  To: Aniket S Joshi, gcc-help

Hi Aniket,

Errors like that may mean that you have a typo in your structure.

For instance:

typedef struct Foo
{
	int a;
} FOO;

typedef struct Bar
{
	int b;
	FOOO c; // <-- typo
} BAR;

Check your header file for spelling errors.  For instance, "CALENDER" for 
"CALENDAR".

HTH,
--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* GCC structure compilation error
@ 2004-03-26 12:39 Aniket S Joshi
  2004-03-26 12:44 ` Eljay Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: Aniket S Joshi @ 2004-03-26 12:39 UTC (permalink / raw)
  To: gcc-help

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-26 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-26 17:10 GCC structure compilation error Robert Wimmer
  -- strict thread matches above, loose matches on Subject: below --
2004-03-26 12:39 Aniket S Joshi
2004-03-26 12:44 ` Eljay Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).