Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

harkathmaker

macrumors newbie
Original poster
Jun 18, 2009
1
0
Hi,

I am trying to use a .dylib file in an Xcode project. In the example I am following, there is a custom script added:


install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/libirrklang.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME"


It changes the directory where Xcode searches for the .dylib from a certain directory to the same place as the created file.

This works for a Carbon shell target, but not for an application. I was wondering, is there a way to accomplish this same thing with a .app target?
 

vishvesh

macrumors newbie
Mar 17, 2008
18
0
India
right click the carbon target,
select add-> new build phase->new run script build phase

in new window opened add the following

install_name_tool -change /usr/local/lib/xyz.dylib /path/xyz.dylib "appName"
install_name_tool -id /path/xyz.dylib xyz.dylib

It should work fine after this
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.