• 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
Re: Compilation leads to Undefined symbols of a nested static lib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation leads to Undefined symbols of a nested static lib


  • Subject: Re: Compilation leads to Undefined symbols of a nested static lib
  • From: Peter O'Gorman <email@hidden>
  • Date: Sun, 16 Mar 2008 11:43:05 -0500

Dmitry Markman wrote:
> I hope solution for the
> discussion for  CFBundleGetFunctionPointerForName will help you
> namely use -all_load flag, when you link your final binary
>
>  see also man page for the linker ld

-all_load is not usually an ideal solution, it causes all members of all
static archives to be loaded into the output. There is no way to select
which static archives are to have all member objects loaded (unlike,
e.g. the GNU ld --whole-archive flag). This can mean getting a bloated
output with unnecessary objects, getting static link time errors for
multiply defined symbols, or getting run time errors when the version of
the symbol foo that ends up being used is not the one the developer
expected. Problems are especially prevalent when using the 10.3.x SDK
and gcc-3.x because libgcc and libstdc++ for that compiler ship as
static archives.

I would suggest creating a reloadable object instead of a static archive
where you would want all members of the archive loaded by the static
linker. I believe there is a target option in the Xcode gui to create
one (the equivalent of ld -r *.o)

Peter
--
Peter O'Gorman
http://pogma.com
 _______________________________________________
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

References: 
 >Compilation leads to Undefined symbols of a nested static lib (From: Alfred Van Hoek <email@hidden>)
 >Re: Compilation leads to Undefined symbols of a nested static lib (From: Dmitry Markman <email@hidden>)

  • Prev by Date: Re: Compilation leads to Undefined symbols of a nested static lib
  • Next by Date: Xcode fails to launch: can't work with Xcode anymore....
  • Previous by thread: Re: Compilation leads to Undefined symbols of a nested static lib
  • Next by thread: Xcode fails to launch: can't work with Xcode anymore....
  • Index(es):
    • Date
    • Thread