forlano Messages: 1109 Registered: March 2006 Location: Italy
I have compiled and packaged my app in a dmg file. I used the Mysql library and on my mac it works perfectly.
When the dmg file is installed on another mac the program cannot run because of missing libmysqlclient.dylib .
The installation of this library seems to be tricky because depends upon then operative system and one needs to create a symbolik link. Now I am fighting with a user of mine to install correctly such lib.
I wonder if we can statically link libmysqlclient or if make sense to include it in my package.
EDIT: it seems that my application look for the libmysqlclient.dylib in the same place where it existed at compile time. So when the app is moved on another computer in which the libmysqlclient.dylib is somewhere else the app refuse to work ( http://lessons.livecode.com/m/4071/l/15029-linking-an-osx-ex ternal-bundle-with-a-dylib-library).
The problem can be fixed with Xcode modifying the path and pointing it to a folder coming with the app itself. The procedure make little sense to me because I do not use Xcode.
So the possibility to link statically libmysqlclient.a should be the easiest solution.
I have added in main package configuration a new linker option to -lmysqllib. It compiles but the executable dimension remain the same instead to increase of 8 Mb... so it seems the static link is not performed ...still inquiring
EDIT2: no success in statically linking libmysqlclient