Re: Cross-development references to system dylibs
Re: Cross-development references to system dylibs
- Subject: Re: Cross-development references to system dylibs
- From: Jeffrey Johnson <email@hidden>
- Date: Tue, 15 Nov 2005 11:57:53 -0500
email@hidden (Chris Espinosa) on 11/15/05(11:13 AM-0800) wrote:
>On Nov 15, 2005, at 7:48 AM, Jeffrey Johnson wrote:
>
>> Delete and add a reference to MacOSX10.4u.sdk/usr/lib/libz.1.2.3.dylib
>> this time. STILL undefined. Delete and add a reference to
>> /usr/lib/libz.dylib (the lib on my active OS). Symbols are now found.
>>
>> I thought the concept of the cross-development SDK was to use its
>> references instead of using ones tied to the OS version on the
>> development box, and the "Cross Development Programming Guide" seems
>> to confirm this, but these refs don't resolve at link time. (BTW, a
>> shell script that I use to do some post-processing confirms that
>> SDKROOT is set to /Developer/SDK/MacOSX10.4u.sdk .)
>>
>> Which references should I be using, and will my app (built against my
>> 10.4.2 box) have problems running on a different variant of 10.4.x?
>
>Two things: Xcode 2.2, unlike earlier versions of Xcode and Project
>Builder, preserve references to symlinks and pass them through to the
>linker, so the linker will be told to link against libz.dylib instead
>of the specific libz.1.2.3.dylib.
>
>Second, as Shawn said, you should just point to the libz in /usr/lib
>and let Xcode apply the SDK prefix for you.
>
>This should be working, so it would help if you'd copy and paste the
>linker invocation line for your executable.
Adding a reference to /usr/lib/libz.dylib is working (in that the symbols are found). Apparently I was overthinking and thought I needed to Project->Add To Project literal references from the inside the SDK folder I want to target (I was doing this in 2.1 and it found the symbols, maybe it shouldn't have). I prefer adding refs from /usr/lib and letting the IDE work out the details.
I think this is solved now, but here's my (successful) link line for completeness:
Ld /Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey/build/Development/Odyssey.app/Contents/MacOS/Odyssey normal ppc
cd /Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey
/usr/bin/g++-4.0 -o /Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey/build/Development/Odyssey.app/Contents/MacOS/Odyssey -L/Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey/build/Development -L../../pre_release/lib/ody200.1_10.2_ab8/G3 -L/Applications/Absoft/lib -F/Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey/build/Development -F/Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey -filelist /Volumes/Deck_2/Users/jaj/source/ody200.1/Odyssey/build/Odyssey.build/Development/Odyssey.build/Objects-normal/ppc/Odyssey.LinkFileList -framework Cocoa -framework WebKit -framework OpenGL -framework RBSplitView -lMathLib -lWFUtilsFort -lOdySymmetry -lOdyMinimizerFort -lf77math -lz -arch ppc -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
/
Thanks
Jeffrey Johnson
Macintosh Development
Wavefunction, Inc.
_______________________________________________
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