Xcode picking up wrong library
Xcode picking up wrong library
- Subject: Xcode picking up wrong library
- From: Rick Mann <email@hidden>
- Date: Wed, 25 Mar 2009 16:59:29 -0700
I have a project that includes a version of libmp3lame. My project
explicitly includes our built libmp3lame.a file, but Xcode insists on
picking up the libmp3lame.dylib in /usr/local/lib (which I happen to
have, but not all users of my app will).
So, my options seem to be to either reference the library I really
want with -l/full/path/to/lib, or use -Z to remove the default ld64
search paths (and possibly re-add the default paths to the end of our
search paths).
Thing is, I'm seeing that although the search paths are in the right
order, ld64 *still* chooses the lib in /usr/local/lib incorrectly.
This is what the link invocation looks like:
/Developer/usr/bin/g++-4.0
-arch ppc
-isysroot /Developer/SDKs/MacOSX10.4u.sdk
-L/Users/me/FooCompany/depot/main-digital-music/desktop/osx/
FooCompanyProdAgent/../build/Release
-L/Users/me/FooCompany/depot/main-digital-music/desktop/osx/
FooCompanyProdAgent/../../id3lib/build/universal
-L/Users/me/FooCompany/depot/main-digital-music/desktop/osx/
FooCompanyProdAgent/../../lame/build/universal
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib
-F/Users/me/FooCompany/depot/main-digital-music/desktop/osx/
FooCompanyProdAgent/../build/Release
-F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
-filelist "/Users/me/FooCompany/depot/main-digital-music/desktop/osx/
FooCompanyProdAgent/../build/FooCompanyProdAgent.build/Release/
FooCompany Prod Agent.build/Objects-normal/ppc/FooCompany Prod
Agent.LinkFileList"
-mmacosx-version-min=10.4
-lcurl
-lssl
-lcrypto
-lz
-liconv
-licucore
-lc
-Z
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/Appscript.framework/Appscript
-framework Cocoa
-framework IOKit
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/libencryptlib.a
-lid3
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/libistcore.a
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/libkernel.a
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/libmp3_wrapper.a
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/libsynchronization.a
/Users/me/FooCompany/depot/main-digital-music/desktop/osx/build/
Release/libsyslog.a
-lmp3lame
-o "/Users/me/FooCompany/depot/main-digital-music/desktop/osx/
FooCompanyProdAgent/../build/FooCompanyProdAgent.build/Release/
FooCompany Prod Agent.build/Objects-normal/ppc/FooCompany Prod Agent"
If I remove the two search paths for /usr/lib and /usr/local/lib, it
works. Is there no way to get ld64 to respect my paths?
TIA,
--
Rick
_______________________________________________
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