* GCC: structure typedef compilation error
@ 2004-03-26 16:12 Aniket S Joshi
2004-03-26 16:38 ` Dave Korn
2004-03-30 9:39 ` GCC: " Jim Wilson
0 siblings, 2 replies; 3+ messages in thread
From: Aniket S Joshi @ 2004-03-26 16:12 UTC (permalink / raw)
To: gcc
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
* RE: structure typedef compilation error
2004-03-26 16:12 GCC: structure typedef compilation error Aniket S Joshi
@ 2004-03-26 16:38 ` Dave Korn
2004-03-30 9:39 ` GCC: " Jim Wilson
1 sibling, 0 replies; 3+ messages in thread
From: Dave Korn @ 2004-03-26 16:38 UTC (permalink / raw)
To: gcc
> -----Original Message-----
> From: gcc-owner On Behalf Of Aniket S Joshi
> Sent: 26 March 2004 12:25
> 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
You're also getting about a million other errors you didn't mention,
because you haven't defined uint16, SERIAL_DISPLAY, SERIAL_POWER, or any of
those other structures you're using. This is a case of PEBKAC: the problem
is that you forgot to finish writing your program before you tried to
compile it.
cheers,
DaveK
--
Can't think of a witty .sigline today....
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GCC: structure typedef compilation error
2004-03-26 16:12 GCC: structure typedef compilation error Aniket S Joshi
2004-03-26 16:38 ` Dave Korn
@ 2004-03-30 9:39 ` Jim Wilson
1 sibling, 0 replies; 3+ messages in thread
From: Jim Wilson @ 2004-03-30 9:39 UTC (permalink / raw)
To: Aniket S Joshi; +Cc: gcc
Aniket S Joshi wrote:
> file2.c:10: error: request for member 'Module_Present' in something not a structure or union
See http://gcc.gnu.org/bugs.html for info on how to submit bug reports.
In particular, we need a complete testcase that we can compile. Your
example code can't be compiled. This is unlikely to be a gcc problem
though, more likely a problem in your code.
Note also that "Module_Present" and "Modules_Present" are not the same
thing, so your reported error message doesn't match the code sample.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-30 1:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-26 16:12 GCC: structure typedef compilation error Aniket S Joshi
2004-03-26 16:38 ` Dave Korn
2004-03-30 9:39 ` GCC: " Jim Wilson
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).