Re: [PARTIALLY SOLVED]Re: Forcing G++ for linking?
Re: [PARTIALLY SOLVED]Re: Forcing G++ for linking?
- Subject: Re: [PARTIALLY SOLVED]Re: Forcing G++ for linking?
- From: Eric Albert <email@hidden>
- Date: Tue, 20 Sep 2005 19:38:28 -0700
On Sep 20, 2005, at 7:14 PM, Nick Zitzmann wrote:
On Sep 19, 2005, at 10:18 PM, Nick Zitzmann wrote:
How do I force Xcode to use G++ to link a binary instead of GCC? Is
that even possible?
No one responded, but I figured out one way of doing this: Create a
C++ file, write a dummy C++ class, add it to the target, and build.
Then Xcode will use G++ to link the binary.
I wonder if setting LD to /usr/bin/g++-4.0 might do the trick. I'm not
sure about that, though.
The problem: It appears that, even when Xcode is using G++, for some
weird reason it is linking the binary (a mixed C/C++/ObjC bundle)
against both the static and dynamic versions of libgcc. I was able to
work around this by adding "-nostdlib" and all of the libraries other
than libgcc.a, but this seems like a hack, and it'll probably break
should the project be compiled with a different version of GCC. Why is
this happening? Is there a better way of fixing this problem, and if
so how?
libgcc.a should only get pulled in by things which are building with
gcc 3.3, and you probably don't want to mix static libraries built with
3.3 with products built with 4.0. I'd suggest making sure that you're
using the same compiler version for all pieces of your project.
Hope this helps,
Eric
_______________________________________________
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