deploy casablanca with mac os x app

Sep 19, 2014 at 10:07 PM
I have problem to deploy casablanca libcpprest.dylib with my mac app.

I can run my app in Xcode gui debug, however when I run the app outside Xcode guy, i got error:
Dyld Error Message:
Library not loaded: /Users/zhongwu/Projects/XCode/casablanca/build.release/Binaries/libcpprest.2.2.dylib

The path is my old project which no longer exists. if I copy compiled casablanca there, i can run my app. I cannot find any reference in my current project of the old path, I also copy libcpprest.2.2.dylib to app bundle framework folder.

I have struggled for two days. Please Help me, this project is very urgent!


-Zhong
Coordinator
Sep 19, 2014 at 10:14 PM
Hi Zhong,

The issues you're having are due to the algorithms used by OSX to lookup libraries for loading. I believe the tool you will need to use is install_name_tool:

http://stackoverflow.com/questions/2985315/using-install-name-tool-whats-going-wrong
https://blogs.oracle.com/dipol/entry/dynamic_libraries_rpath_and_mac
http://stackoverflow.com/questions/11598082/install-name-tool-on-os-x-lion

Sincerely,
roschuma
Sep 19, 2014 at 11:36 PM
that works! thank you very much!
Coordinator
Sep 20, 2014 at 1:21 AM
For future users, could you put the full command line you used in here?

Thanks,
roschuma