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: problem with compiling source code

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    3

    problem with compiling source code

    I have problems with it compiling of my openGL source code.

    I type in my terminal:
    gcc -o cube cube.c -L/usr/X11R6/lib/ -Wall -lX11 -lXi -lXmu -lglut -lMesaGL -lMesaGLU -lm

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2001
    Posts
    5

    Re: problem with compiling source code

    What kind of problems is gcc reporting?
    Examples or error messages would be nice.

  3. #3
    Guest

    Re: problem with compiling source code

    I'm not sure it is realy realated but
    you should use
    -lGL instead of -lMesaGL
    -lGLU ...

    with this your program 'll be able to use hardware acceleration.

    if it is a linking problem, as
    ??? undefined reference to glVertex....
    ....
    ...
    ..

    check if you have really the needed librairies in /usr/lib libGL... libGLU
    or if you use mesa libMesaGL and libMesaGLU

    On my system i have the two with in fact symlink beetween them

    When i compile i use:
    gcc cube.c cube -L/usr/X11R6/lib -Wall -lX11 -lXext -lXmu -lGL -lGLU -lglut

    next time you should give more details, because with this we can't know if it is a gcc problem or your code

Posting Permissions

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