• 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
Xcode 2.5 + gcc3.3 linking errors with a default project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode 2.5 + gcc3.3 linking errors with a default project


  • Subject: Xcode 2.5 + gcc3.3 linking errors with a default project
  • From: Scid <email@hidden>
  • Date: Tue, 05 Feb 2008 17:12:22 +0100

Hello,

I'm unable to create a simple C++ application that uses gcc 3.3 and links with for example std::string code in Xcode 2.5 (on a clean 10.4.11 system). I have no problems getting this to work using Xcode 2.4.1 (well, after disabling "Generate Debug Symbols" in Release mode that is).

Steps to reproduce:

From the File menu choose New Project and then select and create a "Carbon C++ Application".

Add the following two lines to main.cp:

#include <string>
std:string s;

Build this project and note how it compiles and links fine.

Then in the Target Info I add GCC_VERSION_ppc (3.3) and SDKROOT_ppc (/Developer/SDKs/MacOSX10.3.9.sdk)

I try to compile and now get a link error:

[...]/xcode25test/build/xcode25test.build/Release/xcode25test.build/Objects-normal/ppc/main.o reference to undefined __ZNSs20_S_empty_rep_storageE

I would expect this to work OK, just like it did in 2.4.1.


I've tried adding "_GLIBCPP_EXTERN_TEMPLATE=0" to the Preprocessor Macros (a hint I found in the archives, which has several cases similar to mine) which appears to get rid of the link error but then gives me a new one:


ld: [...]/xcode25test/build/xcode25test.build/Release/xcode25test.build/Objects-normal/ppc/main.o illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (18) to symbol: __ZNSs4_Rep10_M_destroyERKSaIcE defined in dylib: /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libstdc++.dylib)


The only workaround I found so far is copying the 10.3.9 SDK dir of Xcode 2.4.1 on top of the one Xcode 2.5 uses. This gets rid of the linking errors. I don't know if this has any nasty side effects, so can anyone tell me if this is safe to do? (otherwise I'll switch back to 2.4.1 for now)
Point to the (Xcode 2.5) 10.2.8 SDK also works in this case (but is giving me other problems in my own project), it's only the original Xcode 2.5 10.3.9 SDK which appears to be at fault.



Regards, Dimitri _______________________________________________ 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
  • Prev by Date: Re: Simple Cocoa/Web-Services Application
  • Next by Date: Re: Xcode eats 100% CPU and more while typing
  • Previous by thread: Xcode build process re: data models
  • Next by thread: GenerateDSYMFile: Warning: no debug map in executable
  • Index(es):
    • Date
    • Thread