shared library not found while linking C program
Eljay Love-Jensen
eljay@adobe.com
Fri Aug 16 09:28:00 GMT 2002
COMPILE:
gcc toto.o myOwnSharedLibrary.so -o toto.executable
(Always put the files WITH the dependency first, and the files that PROVIDE
the linkage later in the link line. Probably not necessary for .so files,
but a good habit to get into.)
RUN:
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH toto.exectuable
I assume you don't have . (current working directory) in your LD_LIBRARY_PATH.
--Eljay
More information about the Gcc-help
mailing list