Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shared libraries



>	/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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org