Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 and files.

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

  2. #2
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Try this as root and then see if it compiles:
    cd /usr/X11R6/lib
    ln -s
    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