• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compilation error on XCode 1.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Compilation error on XCode 1.5 (From: Manoj Tyagi <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: CVS and Subversion - How to handle Resource fork files
  • Previous by thread: Compilation error on XCode 1.5
  • Next by thread: CVS and Subversion - How to handle Resource fork files
  • Index(es):
    • Date
    • Thread