• 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
[FAQ] Xcode 2.2 Project Doesn't Compile C++ as C++ [was: How does Xcode decide whether to use g++ for linking or gcc]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FAQ] Xcode 2.2 Project Doesn't Compile C++ as C++ [was: How does Xcode decide whether to use g++ for linking or gcc]


  • Subject: [FAQ] Xcode 2.2 Project Doesn't Compile C++ as C++ [was: How does Xcode decide whether to use g++ for linking or gcc]
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 13 Jan 2006 13:18:12 -0800


On Jan 13, 2006, at 11:16 AM, Holger Hoerich wrote:

seems like I'm looking at the wrong places ... I can't find anything about this:

I just upgraded my projects to Xcode 2.2. After a lengthy cleanup session of my build settings now everything worked. But as I started with a new project from scratch using a library which was build with an existing project I got all this linking errors about unresolved symbols like I had missed to include libstdc++.a.

So I figured out the difference was that my old project used g++ for linking while my new one uses gcc. Is there any way to conveniently tell the linker to use g++ instead of gcc except overriding all the different LD_$(arch) settings?

gcc is the top-level compiler driver. It determines (by a combination of file extensions and the -x flag) what actual compiler to invoke. Xcode drives this by the "file type" of each file, stored in the project file.


The most common thing we've seen is that in your older project, the file types of your C++ files were set to

sourcecode.cpp

instead of the (don't ask why it's) more correct

sourcecode.cpp.cpp

Select all your .cp or .cpp files, do Get Info, and in the General tab set the File Type to sourcecode.cpp.cpp, and Xcode 2.2 should force C++ execution

Chris

_______________________________________________
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: [FAQ] Xcode 2.2 Project Doesn't Compile C++ as C++ [was: How does Xcode decide whether to use g++ for linking or gcc]
      • From: Holger Hoerich <email@hidden>
References: 
 >How does Xcode decide whether to use g++ for linking or gcc (From: Holger Hoerich <email@hidden>)

  • Prev by Date: Re: MacIntel apps behaves weirdly when compiled with -02 not -01 - Almost solved(auto-vectorization issue)
  • Next by Date: RE: Conversion operator not being picked up by compiler
  • Previous by thread: How does Xcode decide whether to use g++ for linking or gcc
  • Next by thread: Re: [FAQ] Xcode 2.2 Project Doesn't Compile C++ as C++ [was: How does Xcode decide whether to use g++ for linking or gcc]
  • Index(es):
    • Date
    • Thread