Re: No static functions with linking .a to .dylib
Re: No static functions with linking .a to .dylib
- Subject: Re: No static functions with linking .a to .dylib
- From: Greg Parker <email@hidden>
- Date: Fri, 13 May 2011 13:39:54 -0700
On May 13, 2011, at 8:10 AM, Alexander Zvyagin wrote:
> Hello, all!
>
> Please help me to link compiled *.a modules to *.dylib library.
>
> Currently linked file has runtime errors with no static functions found from .a module by .dylib library:
>
> +[NSString stringStaticFunction]: unrecognized selector sent to class 0x12345678
> +[NSString stringStaticFunction]: unrecognized selector sent to class 0x12345678
> +[NSString stringStaticFunction]: unrecognized selector sent to class 0x12345678
> ...
> etc.
>
> I'm try to use '--whole-archive' linker flag, but it doesn't help.
>
> Some peoples (http://savannah.gnu.org/support/?105489) say about this flag is doesn't actual on OSX.
The Mac OS X linker is not GNU ld, so GNU ld's linker flags won't work.
The flags you want are described here. Don't forget to read the IMPORTANT note at the bottom.
http://developer.apple.com/library/mac/#qa/qa2006/qa1490
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden