Hedge
Hedge

Reputation: 16748

dyld: Library not loaded (image not found) but it's there

I got this error when trying to launch my Qt-application (which was deployed with macdeployqt) on another Mac.

dyld: Library not loaded: kqoauth.framework/Versions/0/kqoauth
Referenced from: /MyProject.app/Contents/MacOS/MyProject
Reason: image not found
Trace/BPT trap

I checked the .app-bundle and copied the kqoauth.framework to a few different locations (Frameworks-folder, next to the executable file, Resources-folder) but the error remained. This is my project-tree:

enter image description here

I also tried otool -L on it and everything seems to be fine. (the entry for kqoauth.framework looked the same as those for the qt-libraries)

Upvotes: 4

Views: 4683

Answers (2)

user5180348
user5180348

Reputation:

I have solved this issue by changing the following settings

Go to Project Setting Your_Target->General->Embedded Binaries-> Click on + button and add your library here

Upvotes: 1

Patrick
Patrick

Reputation: 547

Check that otool -L was showing relative paths for both Qt and for kqoauth, my guess is they are probably all starting at root / and you didn't see the qt loading failing, because they're installed on your system.

Regardless, I suggest following this tutorial to correctly inform the binary where all the dylibs are: Qt Deploying on Mac OS X. Here's the man for install_name_tool, which is used in that tutorial.

Upvotes: 3

Related Questions