Thread: errors with opengl & glut in windows

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    54

    errors with opengl & glut in windows

    not sure of this is the correct forum for this question so if it aint feel free to move it

    okay, heres my problem, i have wrote a file in opengl & glut and it works perfectly, or as perfect as i want it to be

    i have also designed and coded a GUI which i want to display the openGL on

    without the opengl stuff, the GUI works okay, couple of glitches but i'll get round to them
    by itself the opengl code does what its meant to do, fine

    but when i try to bring them both together i get these error messages:

    Ecology Visualisation.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
    Ecology Visualisation.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
    Debug/Master Project.exe : fatal error LNK1120: 2 unresolved externals


    i have installed the latest opengl32 and installed into the correct directories

    does anyone have any idea whats causing this please

    thanx in advance

    korbitz

  2. #2
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    those are linker errors, make sure that you are including all of the proper libs and header files

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    54
    yeah i have, as i said on there own both GUI and opengl works, but not when they are brought together

  4. #4
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    check again or post your source

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    54
    okay, looked and reloaded each file into the project, still the same problems

    so heres the source, sorry bout the size though

    also please disregard the mess in the GUI file, just starting out on win32 API

  6. #6
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    not only does it compile but it runs

  7. #7
    Registered User
    Join Date
    Nov 2001
    Posts
    54
    so basically, its something to do with the way i have visual studio setup then?

    do you have any ideas at all why it works on yours but not mine, i am using Visual Studio 6

  8. #8
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    i have visual studio 6 as well

    I suggest completely rebuilding the project. that should work for ya buddy

    I assume you know how to do this, but in case you dont', just go to Build and Rebuild All. tell me how and if that works

  9. #9
    Registered User
    Join Date
    Nov 2001
    Posts
    54
    i managed to remove the errors by sending my source to someone else who then compiled the code and ran it, then he sent the exact same code back to me and it worked

    is that wierd or what

    anyway thanx for all the help guys

  10. #10
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    that would have been fixed if you had re built the entire project like I said. The problem was that there was an object file(s) that had an error, but was not being rebuilt because of something you were doing. The only way around that is deleting your object files (or, if you know what object file is problematic, just that one), and rebuilding the project, or just go to the menu command to rebuild everything.

  11. #11
    Registered User
    Join Date
    Nov 2001
    Posts
    54
    LOL, but i did rebuild the project before i sent the code to someone else

  12. #12
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    did u delete the object files and then rebuild?

  13. #13
    Registered User
    Join Date
    Nov 2001
    Posts
    54
    no, i just pressed rebuild

    should read better i think

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors with header files in OpenGL using VisualC++
    By wile_spice in forum Game Programming
    Replies: 3
    Last Post: 06-22-2006, 08:56 AM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  4. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 02:58 AM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM