Re: Xcode Framework wrapper for Library ( Exposing library headers)
Re: Xcode Framework wrapper for Library ( Exposing library headers)
- Subject: Re: Xcode Framework wrapper for Library ( Exposing library headers)
- From: Jens Alfke <email@hidden>
- Date: Mon, 06 Feb 2017 16:34:35 -0800
> On Feb 6, 2017, at 2:46 PM, Mr steve davis <email@hidden> wrote:
>
> Thanks for the reply. However, it all seems to be in place.
>
> MyProject->'Ljnk Binary with Libraries’ = MyFramework
> MyFramework->'Ljnk Binary with Libraries’ = libMyLibrary.a
Ah — I think you are running into a linker ‘feature’ where, if no symbol from a .a file is being used in the target being linked, it’ll just dead-strip the entire contents of the .a file. In other words, the linker sees that your framework doesn’t use anything in the .a file, so it just ignores the .a file when building the framework.
In the framework target, set “Other Linker Flags” to "-ObjC -all_load” (with single hyphens, not double.) That should fix it.
Another way to fix this is to explicitly list the symbols that your framework exports. This is actually a better solution because it can help dead-strip unused code from the framework, but it takes a little more work to set up (look up “.exp file”…)
—Jens
_______________________________________________
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