• 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: Linking additional object files into framework project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking additional object files into framework project


  • Subject: Re: Linking additional object files into framework project
  • From: Jonathan Prescott <email@hidden>
  • Date: Sun, 13 Apr 2014 20:29:32 -0400

Why can’t you simply link in MyStaticLib in addition to MyFramework?  Link them both into MyApp.  That way, additional symbols that MyApp needs that MyFramework doesn’t, can get resolved by the linker for MyApp.

Jonathan

On Apr 11, 2014, at 4:34 PM, Jonathan Mitchell <email@hidden> wrote:

>
> On 11 Apr 2014, at 18:23, Jonathan Prescott <email@hidden> wrote:
>
>>  You may still need to link both libraries as indicated previously if the program directly invokes class methods defined in the B.a library without going through the A.framework.
>
> I put together a trivial sample project that mimics the proposed solution:
>
> 1. MyStaticLib defines MySubClass : MyBaseClass
>
> 2. MyFramework defines MyBaseClass : NSObject
>
> 3. MyFramework links in MyStaticLib
>
> 4. MyApp links to MyFramework.
>
>
> MyApp can only utilise symbols defined in MyStaticLib if MyFramework itself references the same symbols, which makes sense.
> symbols(1) confirms this.
>
> So this approach won’t work unless the linker can be persuaded to link all unreferenced objects in MyStaticLib into MyFramework (I tried -ObjC, -all_load and -Xlinker -reexport_library without success).
> I thought that I might be onto something with -reexport_library or -sub_library but these seem to require a dylib argument.
>
> Note that I am only going down this separate makefile target route because the 1300+ number of object files involved is too slow and unwieldy for a regular Xcode project.
>
> So perhaps passing an additional/augmented -filelist argument into my framework build will be the way forward.
>
> Jonathan
>
>
>
> _______________________________________________
> 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


 _______________________________________________
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


  • Follow-Ups:
    • Re: Linking additional object files into framework project
      • From: Jonathan Mitchell <email@hidden>
References: 
 >Linking additional object files into framework project (From: Jonathan Mitchell <email@hidden>)
 >Re: Linking additional object files into framework project (From: Jens Alfke <email@hidden>)
 >Re: Linking additional object files into framework project (From: Jonathan Mitchell <email@hidden>)
 >Re: Linking additional object files into framework project (From: Jonathan Prescott <email@hidden>)
 >Re: Linking additional object files into framework project (From: Jonathan Mitchell <email@hidden>)
 >Re: Linking additional object files into framework project (From: Jonathan Prescott <email@hidden>)
 >Re: Linking additional object files into framework project (From: Jonathan Mitchell <email@hidden>)

  • Prev by Date: Re: per-project dependent project build settings
  • Next by Date: Re: With my External Build Project How do I "Add Run Script" in Build Phases? SOLVED
  • Previous by thread: Re: Linking additional object files into framework project
  • Next by thread: Re: Linking additional object files into framework project
  • Index(es):
    • Date
    • Thread