Standard Library linking problems - anyone?
Standard Library linking problems - anyone?
- Subject: Standard Library linking problems - anyone?
- From: David Cohn <email@hidden>
- Date: Thu, 24 Aug 2006 08:54:28 -0700
from http://lists.apple.com/archives/xcode-users/2005/Jul/msg00495.html:
If you are compiling C++, the compiler automatically links against
the appropriate C++ standard librari
from http://lists.apple.com/archives/xcode-users/2005/Jul/msg00538.html:
If the stdc++ lib is not included, just add it to your projet as
you do for all other liibraries.
No, don't do this.
We omit this from the UI and from the project templates for a reason.
The compiler "owns" the definition of the C++ standard library,
because the use of the library is tightly coupled with C++ code
generation. So the compiler determines, based on your code model,
what library functions to link to. Let the compiler do its job.
Does anyone have any further information, clues, hints on how these
linkage errors may arise?
- If linkage is automatic, how can one get linkage errors which seem
to involve standard c++ symbols?
- Is there a way to tell from the build transcript what may be going
on here?
- Can one get such link errors from conflicts in linked libs
compiled in different projects? (e.g. different target SDKs?)
Any thoughts appreciated, and thanks!
--Dave
Hey all,
(I'm using Xcode 2.4, building a project for archs "ppc i386".)
I've read the thread "Re: linking against stdandard libraries":
http://lists.apple.com/archives/xcode-users/2005/Jul/msg00495.html
...which states that linking with Standard C libraries should be
automatic, but I'm having trouble with some pesky "Undefined symbols"
which go away if I manually link stdc++:
___gxx_personality_v0
vtable for __cxxabiv1::__class_type_info
vtable for __cxxabiv1::__si_class_type_info
___cxa_pure_virtual
vtable for __cxxabiv1::__pointer_type_info
___cxa_begin_catch
___cxa_end_catch
vtable for __cxxabiv1::__vmi_class_type_info
___cxa_allocate_exception
___cxa_throw
I have LINK_WITH_STANDARD_LIBRARIES set, and can't find any other
settings which seem to affect this.
...so my questions are:
- under what circumstances are the Standard Libraries passed or not?
- can I examine the Ld command line to verify what's happening?
(i.e. what parameters would show the standard libraries being passed,
or should I be seeing an explicit "-L" parameter for the requisite
standard libs?)
Thanks,
--Dave
_______________________________________________
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