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: dumb newbie help

  1. #1
    Guest

    dumb newbie help

    I have the read book and I'm trying to get the first example running.
    I use:

    gcc -lGL -lGLU -lglut program.c

    and get /path/libGL.so: undefined reference to 'pow'. I would guess this is because I'm not linking to something. I also thought maybe 'pow' was a power function from some math library because when I was trying to compile other examples it was saying undefined reference to 'sin' and 'cos'. I don't really know though.
    I am running Red Hat linux 7.1. Any help would be appreciated.

  2. #2
    Intern Contributor
    Join Date
    Sep 2001
    Location
    paris, france
    Posts
    84

    Re: dumb newbie help

    add -lm to link with the libm (math library)

    it should do it.

  3. #3
    Guest

    Re: dumb newbie help

    Wow, it works. Thanks.

Posting Permissions

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