Problem with OpenGL

Started by
4 comments, last by Rioghasarig 15 years, 9 months ago
I was trying to compile the source code on a tutorial CD I got for OpenGL. (From Beginning OpenGL by Dave Astle). The tutorials worked just fine until I got up to the chapter about lighting. If you try to make a call to timeGetTime()(which he used to rotate a lit cube) the compiler would return a linker error like: error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function _WinMain@16 I linked both opengl32.lib and glu32.lib to the project (and that worked for all the other tutorials) so I can't quite figure out what's wrong. Any help would be appreciated. Edit: I tried using time(NULL) instead of timeGetTime() but that makes the cube rotate REALLY slowly. ;>_>
Advertisement
timeGetTime() works only on Windows I believe, make sure you have the right includes and libraries for compiling it.
Add winmm.lib
http://www.gamedev.net/community/forums/topic.asp?topic_id=437577
Oh, adding winmm to the linker fixed it.

Thanks. :D
Oh, adding winmm to the linker fixed it.

Thanks. :D

This topic is closed to new replies.

Advertisement