Linker errors...

This is a discussion on Linker errors... within the Game Programming forums, part of the General Programming Boards category; I've made a program where I include the following files: Code: #include <windows.h> #include <gl\gl.h> #include <gl\glu.h> #include <gl\glaux.h> and ...

  1. #1
    the Wizard
    Join Date
    Aug 2004
    Posts
    109

    Linker errors...

    I've made a program where I include the following files:

    Code:
    #include <windows.h>
    #include <gl\gl.h> 
    #include <gl\glu.h> 
    #include <gl\glaux.h>
    and I get 14 linker errors, which look like this:

    Code:
    Linking...
    main.obj : error LNK2001: unresolved external symbol _gluPerspective@32
    main.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
    main.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
    main.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
    main.obj : error LNK2001: unresolved external symbol __imp__glHint@8
    main.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4
    main.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
    main.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
    main.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
    main.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
    main.obj : error LNK2001: unresolved external symbol __imp__glClear@4
    main.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
    main.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
    main.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
    And I really don't get it, why I'm getting them..
    It should be the correct header files, because I've made a program from the same source before, where it compile beautifully...
    -//Marc Poulsen -//MipZhaP

    He sat down, he programmed, he got an error...

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,197
    Dont forget to link with opengl32.lib glu32.lib and (optionally) glaux.lib

  3. #3
    the Wizard
    Join Date
    Aug 2004
    Posts
    109
    Woops, my mistake, I must have missed it in my hurry.. Thx Shakti...
    Pretty embarrasing...
    -//Marc Poulsen -//MipZhaP

    He sat down, he programmed, he got an error...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linker errors
    By jw232 in forum C++ Programming
    Replies: 3
    Last Post: 06-12-2009, 12:56 PM
  2. Linker errors in VC++ 2005
    By C+/- in forum C++ Programming
    Replies: 0
    Last Post: 05-18-2007, 07:42 AM
  3. Sneaky little linker errors...
    By Tozar in forum C++ Programming
    Replies: 8
    Last Post: 10-25-2006, 05:40 AM
  4. why am i getting linker errors?
    By dantestwin in forum C++ Programming
    Replies: 11
    Last Post: 07-08-2004, 10:34 AM
  5. Linker errors with Visual C++
    By codegirl in forum C++ Programming
    Replies: 4
    Last Post: 09-11-2003, 09:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21