Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Compile Error

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2003
    Location
    Minnesota
    Posts
    5

    Compile Error

    I believe that I have everything installed already in order to compile my code. I am running Mandrake 8.1. I am able to compile my code no problem on some school machines. I don't know if I am compiling incorrectly or what. I used the command:

    g++ -o checker checker.cpp -L/soft/X11R6.3/lib -lGL -lGLU -lglut -lX11

    This allowed me to compile my code no problem. Well I know that the GL library is located in a different place on my computer. It is at /usr/X11R6. So I have tried the command:

    g++ -o checker checker.cpp -L/usr/X11R6/lib -lGL -lGLU -lglut -lX11

    However I get an error when I try this command. I am not sure what to do or if I am doing everything right. The error I receive is:

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

    Any help would be greatly appreciated. Thanks to anyone that can help.

    Pete

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2003
    Location
    England
    Posts
    2

    Re: Compile Error

    I seem to remember Mandrake not coming with glut by default but, just in case, it should be in your /usr/lib directory.

    If ls /usr/lib/libglut* doesn't come up with anything the you need to download and install glut or some version thereof. If, it does then type echo $LD_LIBRARY_PATH. If this just gives you a blank line then type export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib and if you can compile your code now then you need to add that line to /etc/profile (or ~/.profile if you do not have root/wheel priviledges).

    hth, Paul

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2003
    Location
    Minnesota
    Posts
    5

    Re: Compile Error

    Well, it does not have glut installed. So I am scraping Mandrake and going to install RedHat 9. I have never really liked mandrake anyways. Hopefully I can get it working in Redhat 9.

    Thanks for the advice Paul

Posting Permissions

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