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: Mr steve davis <email@hidden>
- Date: Tue, 07 Feb 2017 00:47:55 +0000
Thanks, it looks like you were right. Fixed now. I had been down the -ObjC & -all_load route a number of times this week but was not getting any luck.
I assume that -ObjC in combination with “perform single object prefix” & “precompile prefix header” to YES was key.
Once again, thanks for your help, I can now sleep properly at night.
> On 7 Feb 2017, at 00:34, Jens Alfke <email@hidden> wrote:
>
>
>> 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