PDA

View Full Version : Can’t find dynamically linked library on another Mac



Hedge
21st May 2011, 22:59
I want to deploy my application on OSX using dynamically linked libraries inside the app-bundle. Therefore I included and relinked them all by hand (not with macdeployqt) following this guide (http://doc.qt.nokia.com/stable/deployment-mac.html). The problem is a 3rd-party library I compiled myself.

When running the program on another Mac I get the error:


dyld: Library not loaded: lib/kqoauth.framework/Versions/0/kqoauth
Referenced from: /macbuild/MyProject
Reason: image not found

Here's what I executed to assign the right dependencies for kqoauth (the 3rd party library):


cp -R /Library/Frameworks/kqoauth.framework Frameworks

install_name_tool -id @executable_path/../Frameworks/kqoauth.framework/Versions/0/kqoauth Frameworks/kqoauth.framework/Versions/0/kqoauth

#Dependencies of kqOAuth
install_name_tool -change /Users/ali/QtSDK/Desktop/Qt/473/gcc/lib/QtCore.framework/Versions/Current/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore Frameworks/kqoauth.framework/Versions/0/kqoauth
install_name_tool -change /Users/ali/QtSDK/Desktop/Qt/473/gcc/lib/QtNetwork.framework/Versions/Current/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4.0/QtNetwork Frameworks/kqoauth.framework/Versions/0/kqoauth
install_name_tool -change /Users/ali/QtSDK/Desktop/Qt/473/gcc/lib/QtGui.framework/Versions/Current/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui Frameworks/kqoauth.framework/Versions/0/kqoauth

And that is the file-structure of my project:

http://i.stack.imgur.com/ZTK6d.png