Re: Linking additional object files into framework project
Re: Linking additional object files into framework project
- Subject: Re: Linking additional object files into framework project
- From: Jonathan Mitchell <email@hidden>
- Date: Fri, 11 Apr 2014 21:34:52 +0100
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