Re: Compilation error on XCode 1.5
Re: Compilation error on XCode 1.5
- Subject: Re: Compilation error on XCode 1.5
- From: Michael Cashwell <email@hidden>
- Date: Tue, 10 Aug 2004 10:43:49 -0400
On Aug 10, 2004, at 8:42 AM, Manoj Tyagi wrote:
I encountered with a peculiar compilation errors saying
"changes meaning of 'txtattrib' from 'typedef struct txtattrib
txtattrib'".
txtattrib is a structure. The following is the code snippet of the
culprit
structure throwing the said error.
Your indents and white space don't agree with the braces, so I'm
assuming this is:
struct txtattrib {
int16 font,face;
Fixed size;
struct {
colored color;
ubit16 scaledir : 1;
} a;
Fixed shade;
};
typedef struct txtattrib txtattrib;
Not knowing exactly which line is causing the error makes this a guess,
but I have one idea.
Are you somehow declaring the struct and/or typedef more than once? The
error message implies that the compiler knows that txtattrib is
'typedef struct txtattrib txtattrib' and something is trying to change
it. That would happen if you included the above source twice as the
second attempt to declare a "struct txtattrib {" when txtattrib was
already a typedef is going to fail.
Try to preprocess the source file and search for "txtattrib" to see if
somehow the .h file (I assume) is being included multiple times.
I recall some issues porting from CW because features like #pragma once
work differently.
Good luck!
-Mike
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.