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: Problem with libGL.os

Hybrid View

  1. #1
    Guest

    Problem with libGL.os

    I'm trying to compile and link an opengl program using the gcc compiler on a LINUX machine. I keep getting this error: /usr/lib/libGL.os ... undeclared identifier 'pow'

    I'm using these include files in my program: GL/glx.h and GL/gl.h

    This happens whenever I use -lGL option. Has anyone ever seen this before or knows how to fix it?

  2. #2
    Intern Contributor
    Join Date
    Feb 2002
    Location
    Wiesbaden, Germany
    Posts
    97

    Re: Problem with libGL.os

    Hi,

    I forgot what the link option for the math library is, but I think it is -lm. That should fix the problem. pow is a math function, so you have to link against the math library. In most cases you can figure out what you need to include by greping the missing function in the includes.
    Hope this helps,

    Martin

Posting Permissions

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