Cross-platform shared library paths
Marius Kjeldahl
marius at kjeldahl.net
Thu Sep 28 12:43:13 PDT 2006
This isn't a direct wxWidgets related question, but I'm posting here
anyway since I expect experienced wxWidgets programmers may have some
advice.
I'm writing a cross-platform application which will run under *ix and
Mac OS X (and later Windows if practical). The application consist of a
set of dynamic libraries which other applications use.
On linux, I install the libraries and binaries in a separate "bin"
directory. By building the applications using the GNU linker "-rpath ."
option, the applications have no trouble finding the shared libraries
even though they are distributed in the same directory as the
application itself (and not in the standard library paths such as /usr/lib).
On Mac OS X the linker does not support the "-rpath" option, and I
haven't found any easy way to instruct the linker that created the
compiled applications to look for shared libraries in their "current
directory" or "directory where application was launched from".
Have anybody else met similar challenges and found any neat solutions
for this? I realize software packages may be bundled and distributed
differently on the Mac platform, but this software is in-house only at
this stage, so I'm not sure it's worth the effort to create a
traditional Mac installer / disk image (although I may be forced to at
one stage anyway).
Thanks,
Marius Kjeldahl
More information about the wx-users
mailing list