[SOLVED] Re: How to link with alternate Foundation.framework
[SOLVED] Re: How to link with alternate Foundation.framework
- Subject: [SOLVED] Re: How to link with alternate Foundation.framework
- From: Stuart Malin <email@hidden>
- Date: Tue, 20 Jan 2009 14:36:13 -1000
Argghh -- it appears that my problem was that the local version of the Foundation framework to which I was trying to link didn't actually exist. The headers were there, but not the library. Once I got the library in place, it appears that I now link to that.
On Jan 20, 2009, at 12:45 PM, Stuart Malin wrote:
On Jan 20, 2009, at 12:32 PM, Jean-Daniel Dupas wrote:
Le 20 janv. 09 à 22:44, Stuart Malin a écrit :
I know my query is unusual, but I need to link an alternate Foundation.framework with my code.
Background: I am working with The Cocotron so that I can cross-compile some Cocoa/Objective-C to Windows. The Cocotron has its own Foundation framework. I want to do some debugging of The Cocotron's Foundation code on my Mac, and so want to link that framework to my code. I am having trouble doing this. I have generated a Darwin i386 Foundation framework that is located in
/Developer/Cocotron/1.0/Darwin/i386/Frameworks
What I have done is to create a Foundation Tool. I removed the existing Foundation.framework from the External Frameworks and Libraries folder in Groups & Files. I then added my Cocotron version of Foundation.framework. So that it would be linked in, I included this in the Target Memberships for my Foundation Tool.
In the Build Settings for the target, I have set:
Frameworks Search Paths to the location of The Cocotron frameworks
(/Developer/Cocotron/1.0/Darwin/i386/Frameworks)
However, when I execute my Foundation Tool, I don't believe that it is linked in with the Cocotron version of the framework. Am I doing all that I need to do in order to have a different Foundation.framework be linked?
To check if your tool is linked on the "good" framework, you can use the otool utility.
otool -L path/to/your/FoundationTool
it will list the libraries (and frameworks) which are referenced by your tool.
Jean-Daniel, thank you for the reminder to use otool.
Alas, as I suspected, my tool is using the system framework, and not my "local" version.
FoundationTool:
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.12.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.0.0)
|
_______________________________________________
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