Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, I have a problem compiling X applications. Executing this command gives the below error. $ gcc -I/usr/X11R6/include -o PIXMAP draw-pixmap.c -L /usr/X11R6/lib/ -lX11 /usr/bin/ld: cannot find -lX11 collect2: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    6

    Unhappy /usr/bin/ld: cannot find -lX11


    Hi all,
    I have a problem compiling X applications. Executing this command gives the below error.

    $ gcc -I/usr/X11R6/include -o PIXMAP draw-pixmap.c -L /usr/X11R6/lib/ -lX11

    /usr/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status


    I checked the directory /usr/X11R6/lib/ and it includes the libX11.so.6 and libX11.so.6.2 files.

    So what's the problem? and what should I do??
    Many thanks....

  2. #2
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Try this as root and then see if it compiles:
    Code:
    cd /usr/X11R6/lib
    ln -s libX11.so.6 libX11.so
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •