Re: How to link with alternate Foundation.framework
Re: How to link with alternate Foundation.framework
- Subject: Re: How to link with alternate Foundation.framework
- From: Stuart Malin <email@hidden>
- Date: Tue, 20 Jan 2009 12:45:14 -1000
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