Mac OSX Library not loaded

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Mac OSX Library not loaded

Ludovic Silvestre
I don't know if this problem comes from luabind build process or from Boost Build (or maybe I'm doing something wrong), but building the library in Mac OSX isn't done the right way.

Basically, compiling and linking my application works fine. The problem comes when I execute the application, because it cannot find the library to load.

The linking command doesn't have the parameter 'install_name' to change the library's reference path. So the path is 'bin/darwin/debug' instead of the install prefix or the bjam parameter 'dll-path'.
The problem here is that when I install luabind library into '/opt/local/lib', every application that use luabind will be looking at 'bin/darwin/debug' to load the library because of the hardcoded reference (in fact it will search other places, but not /opt/local/lib) and it will fail, giving me a dyld error (Library not loaded).

I build luabind with this command: 'bjam --toolset=darwin --variant=release,debug --prefix=/opt/local install';

Am I doing something wrong or did I just found a bug in the build configuration?

luabind-user mailing list
[hidden email]