• 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: Xcode Framework wrapper for Library ( Exposing library headers)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Xcode Framework wrapper for Library ( Exposing library headers)
      • From: Mr steve davis <email@hidden>
References: 
 >Xcode Framework wrapper for Library ( Exposing library headers) (From: Mr steve davis <email@hidden>)
 >Re: Xcode Framework wrapper for Library ( Exposing library headers) (From: Jens Alfke <email@hidden>)
 >Re: Xcode Framework wrapper for Library ( Exposing library headers) (From: Mr steve davis <email@hidden>)

  • Prev by Date: Re: Xcode Framework wrapper for Library ( Exposing library headers)
  • Next by Date: Re: Xcode Framework wrapper for Library ( Exposing library headers)
  • Previous by thread: Re: Xcode Framework wrapper for Library ( Exposing library headers)
  • Next by thread: Re: Xcode Framework wrapper for Library ( Exposing library headers)
  • Index(es):
    • Date
    • Thread