Re: Standard Library linking problems
Re: Standard Library linking problems
- Subject: Re: Standard Library linking problems
- From: David Cohn <email@hidden>
- Date: Thu, 24 Aug 2006 17:59:35 -0700
Hey all,
Sorry to hog bandwidth, but just for closure's sake...
That last error was due to a hard-coded LIBRARY_SEARCH_PATHS entry to
the SDKs (set at the Target level, so I didn't see it at the Group
level).
Thanks for all your patience!
--Dave
On Aug 24, 2006, at 11:25 AM, David Cohn wrote:
Turns out the problem was that the project contains only C code,
whereas I was linking with libraries containing C++
c.f.: http://lists.apple.com/archives/xcode-users/2005/Nov/
msg00707.html
(Thanks to Eric Albert for that post!)
This gets me down to one link error:
___cxa_get_exception_ptr referenced from OSServices expected to be
defined in libstdc++
... does anyone know why this one reference would be unresolved?
or why it's not in stdc++?
Thanks once more,
--Dave
On Aug 24, 2006, at 8:54 AM, David Cohn wrote:
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