[COLUG] Shared Library
Mark Erbaugh
mark at microenh.com
Fri Mar 30 10:42:16 EST 2007
Is there a "correct" protocol for placing / locating shared libraries?
I'm working with python extensions to gnucash. It uses swig to build a
library, _gnucash_.so. This library can't find libgncqof.so.1 and
libgw-gnc.so.0 when it loads. Both files are in /usr/local/lib. In
addition libgw-gnc.so.0 is in /usr/lib/gnucash.
The example programs use a script that sets the LD_LIBRARY_PATH variable
(via gnucash-env), but I have read that that's the less than optimum
solution.
One web reference I found said to use the gcc -R option in addition to
the -L option to speficy /usr/local/lib, but my version of gcc (4.0.3)
doesn't like the -R option.
I also found a reference about creating a symlink in /usr/lib, but
doesn't that defeat the purpose of having libraries in /usr/local/lib
rather than in /usr/lib?
Thanks,
Mark
More information about the colug432
mailing list