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 2 of 2

Thread: Compiling using unix shell ssh

  1. #1
    Guest

    Compiling using unix shell ssh

    Hi,

    I'm having trouble compiling when I ssh into a unix shell. The command I'm using is: gcc -lglut -lGLU -lGL test.c. I get these errors: /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XGetExtensionVersion'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XFreeDeviceList'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XQueryDeviceState'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XListInputDevices'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XFreeDeviceState'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XOpenDevice'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XmuLookupStandardColormap'
    /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libglut.so: undefined reference to `XSelectExtensionEvent'
    collect2: ld returned 1 exit status
    .

    Does anyone know what I'm doing wrong, do I need to add a library or something? THanks in advance.

  2. #2
    Guest

    Re: Compiling using unix shell ssh

    You need to link the X libs as well. Try:
    Code :
    gcc -lglut -lGLU -lGL -lXmu -lX11 test.c
    For further question you should try the "OpenGL on Linux" board on this site.

Posting Permissions

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