Linking libraries
Linking libraries
- Subject: Linking libraries
- From: Matthew Unrath <email@hidden>
- Date: Fri, 19 Jun 2009 19:58:11 -0700
Hi,
I'm new to Xcode and programming in general.
I am using a library that has a .dylib file. I have added it to my project, and it builds and runs fine. However, when I try to run the application it generates, it brings up an error:
Dyld Error Message:
Library not loaded: /usr/local/lib/libirrklang.dylib
Referenced from: /Users/Shared/Empty_Xcode2/build/Release/HelloWorld.app/Contents/MacOS/HelloWorld
Reason: image not found
I can modify the directory Xcode searches for the .dylib for a Carbon Shell Tool by running a script:
install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/libirrklang.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME"
This makes it look in the directory the Shell Tool is located rather than /usr/local/lib.
It seems that this approach doesn't work for an Application target (the script doesn't work on application files). Is there another way to change the directory in a similar way?
_______________________________________________
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