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: link error

  1. #1
    Guest

    link error

    I'm getting a link error (unresolved glClearColor) with the following code. I'm using the glut32.lib. Where are the gl* functions?


    #include <windows.h>
    #include <gl/glut.h>

    int main(int argc, char **argv)
    {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
    glutInitWindowSize(400, 100);
    glutInitWindowPosition(100, 100);
    glutCreateWindow("First Chapter - Opening an OpenGL Window");


    glClearColor(1.0, 1.0, 1.0, 0.0) ;
    }

  2. #2
    Guest

    Re: link error

    O.K. I wasn't including opengl32.lib

    Problem solved

  3. #3
    Junior Member Regular Contributor
    Join Date
    Oct 2002
    Posts
    205

    Re: link error

    It works fine for me on visual c++ 6.0, what compiler are you using? You don't need to include windows.h if you are using glut unless you are using windows code somewhere else in your app but I doubt that is your problem.

Posting Permissions

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