shared libraries
Glenn Burkhardt
glenn at aoi.ultranet.com
Tue Apr 11 08:16:57 EDT 2000
> /usr/bin/ld: cannot open -lX11: No such file or directory
> collect2: ld returned 1 exit status
I get the same thing unless I include -L/usr/X11R6/lib in the link line. I
don't think the linker uses the shared library cache file; it's used at
run time to find the libraries.
> If I am only linking against one of the libraries such as libX11
> I can pass the
> -L option such as
-L/usr/X11R6/lib/ -lX11
> and ld will find libX11. the problem is if I need libX11 and
> another library in another directory.
Why is this a problem? You should be able to use a link line that finds all
required libraries. For example:
gcc -o er < ... object modules ... > -L/usr/local/qt/lib -lqt -L/usr/X11R6/lib
-lX11 -lXext -lICE -lSM -lm
finds libraries in multiple locations.
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).
More information about the Discuss
mailing list