unix dylib-path
Hello,
We have a
problem with a MacOS X framework written in C accessed by LWM lisp
code. The framework uses an Unix .dylib shared library with an install
path /usr/local/lib. We would like to keep the dylib in a folder
inside our project.
The framework can't be loaded when the dylib is not found at /usr/local/lib. We have found a way around this problem by invoking Lispworks from terminal after manually setting the environment variable DYLD_LIBRARY_PATH to point to the directory where we have stored the dylib. However, our attempts to set this environment variable in LWM before loading the framework have failed. We have tried several methods:
(setf (environment-variable "DYLD_LIBRARY_PATH") "/Applications/LispWorks\ 4.4/PWGL-code/FLI-code/FLI-libs")
or:
(sys:open-pipe (format () "DYLD_LIBRARY_PATH=/Applications/LispWorks\ 4.4/PWGL-code/FLI-code/FLI-libs" ()))
(sys:open-pipe (format () "export DYLD_LIBRARY_PATH" ()))
But it seems that the environment variable is not set correctly or that the system ignores it, as the DYLD lookup fails and the framework doesn't load.
The framework can't be loaded when the dylib is not found at /usr/local/lib. We have found a way around this problem by invoking Lispworks from terminal after manually setting the environment variable DYLD_LIBRARY_PATH to point to the directory where we have stored the dylib. However, our attempts to set this environment variable in LWM before loading the framework have failed. We have tried several methods:
(setf (environment-variable "DYLD_LIBRARY_PATH") "/Applications/LispWorks\ 4.4/PWGL-code/FLI-code/FLI-libs")
or:
(sys:open-pipe (format () "DYLD_LIBRARY_PATH=/Applications/LispWorks\ 4.4/PWGL-code/FLI-code/FLI-libs" ()))
(sys:open-pipe (format () "export DYLD_LIBRARY_PATH" ()))
But it seems that the environment variable is not set correctly or that the system ignores it, as the DYLD lookup fails and the framework doesn't load.
Mikael