HELP:/usr/i486-linux/bin/ld: cannot open -lX11

HELP:/usr/i486-linux/bin/ld: cannot open -lX11

Post by tt764 » Wed, 28 Jan 1998 04:00:00



Hi all,
        I wanted to do Xwindows program using Xlib and run the src like:
%gcc -o xp0201 xp0201.c -lX11
 and got error:
/usr/i486-linux/bin/ld: cannot open -lX11 : no such file or directory.

But I had Xlib under /usr/X11/lib/ directory. I would ask your help. Thanks in advance.

/Nazmul Ahsan
Tokyo University, Japan

 
 
 

HELP:/usr/i486-linux/bin/ld: cannot open -lX11

Post by Gareth Marshal » Wed, 28 Jan 1998 04:00:00



>Hi all,
> I wanted to do Xwindows program using Xlib and run the src like:
>%gcc -o xp0201 xp0201.c -lX11
> and got error:
>/usr/i486-linux/bin/ld: cannot open -lX11 : no such file or directory.
>But I had Xlib under /usr/X11/lib/ directory. I would ask your help. Thanks

in advance.

try:
%gcc -o xp0201 xp0201.c -lX11 -L/usr/X11/lib

It tells it to look in the /usr/X11/lib directory as well...

cya
Gareth

 
 
 

HELP:/usr/i486-linux/bin/ld: cannot open -lX11

Post by Jan Arne Fagertu » Thu, 29 Jan 1998 04:00:00



Quote:> Hi all,
>    I wanted to do Xwindows program using Xlib and run the src like:
> %gcc -o xp0201 xp0201.c -lX11
>  and got error:
> /usr/i486-linux/bin/ld: cannot open -lX11 : no such file or directory.

> But I had Xlib under /usr/X11/lib/ directory. I would ask your help.

gcc -o xp0201 xp0201.c -L/usr/X11/lib/ -lX11

--

http://www.termo.unit.no/mtf/people/janaf/          Phone: +47 73596890
  Research Scientist, SINTEF Applied Thermodynamics and Fluid Dynamics
NTNU => NT, Not Unix... http://www.nvg.ntnu.no/ntnu/ - better use Linux

 
 
 

HELP:/usr/i486-linux/bin/ld: cannot open -lX11

Post by Victor Wagn » Thu, 29 Jan 1998 04:00:00


: Hi all,
:       I wanted to do Xwindows program using Xlib and run the src like:
: %gcc -o xp0201 xp0201.c -lX11
:  and got error:
: /usr/i486-linux/bin/ld: cannot open -lX11 : no such file or directory.
:  
: But I had Xlib under /usr/X11/lib/ directory. I would ask your help. Thanks in advance.

Try to add -L/usr/X11/lib into command line. May be your gcc doesn't search
in /usr/X11/lib by default.

Another problem may be that you are trying to link statically while
you don't have libX11.a, but only libX11.so. It is cured by -rdynamic
as far as I remember.

: /Nazmul Ahsan
: Tokyo University, Japan

--
I have tin news and pine mail...

 
 
 

1. HELP:/usr/i486-linux/bin/ld: cannot open -lX11

Hi all,
        I wanted to do Xwindows program using Xlib and run the src like:
%gcc -o xp0201 xp0201.c -lX11
 and got error:
/usr/i486-linux/bin/ld: cannot open -lX11 : no such file or directory.

But I had Xlib under /usr/X11/lib/ directory. I would ask your help. Thanks in advance.

/Nazmul Ahsan
Tokyo University, Japan

2. i740 Again...

3. Where is host/domain name stored?

4. /usr/i486-linux/bin/ld: cannot open -lXt: No such file or directory

5. mapkey doesnt remap numeric / on 3.2v4.2

6. /usr/i486-linux/bin/ld can not find files that exist!

7. strange raid messages

8. /usr/ccs/bin/ld Vs. /usr/ucb/ld

9. /usr/libexec/elf/ld: cannot find -lX11

10. Getting error: ld: cannot open -lX11: No such file or directory?

11. ld: cannot open -lX11: No such file or directory ?

12. Aaah! ld: cannot open -lX11