• 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
gcc 4.0 begins complaining of "redefinition of typedef 'foo'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc 4.0 begins complaining of "redefinition of typedef 'foo'


  • Subject: gcc 4.0 begins complaining of "redefinition of typedef 'foo'
  • From: Bill Monk <email@hidden>
  • Date: Wed, 15 Jun 2005 09:25:07 -0500

So XCode 2.1/gcc 4.0 has been happily building a codebase which uses "#pragma once" in all its headers.

Suddenly today, building the project produces reams of these errors:

"in file included from /path/foo.h
error: redefinition of typedef 'bar'
previous declaration was here" (where "here" points to header foo.h)



Well, hmm, that looks what you'd see for headers being included more than once.


Seems that I recall some older versions of gcc didn't support #pragma once. Of course, the project has been building just fine with them, but just for grins I turned on warnings for unknown pragmas...however no complaints. for that.


If I remove the supposedly offending inclusion of foo.h, the complaints, unsurprisingly, change to


error: parse error before 'someVariableName'
warning: data definition has no type or storage class


So suddenly XCode 2.1 is giving me a Catch 22. Ideas?











_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: gcc 4.0 begins complaining of "redefinition of typedef 'foo'
      • From: Tim Conkling <email@hidden>
  • Prev by Date: Re: error: parse error before "Game"
  • Next by Date: cross development
  • Previous by thread: Re: Output files, working directories and BUILD_STYLE
  • Next by thread: Re: gcc 4.0 begins complaining of "redefinition of typedef 'foo'
  • Index(es):
    • Date
    • Thread