Alright I’m pretty new to using VS. I’m trying to figure out the time elapsed between updates in an OpenGl program (in C), and I was planning on using timeGetTime().
I have
#include <windows.h>
at the top of my program. As well under “Project>Properties>Linker>Input”, I have “Additional Dependencies” include “winmm.lib”. Now whenever I try to use timeGetTime(), it gives me two errors:
Error 63 error LNK2019: unresolved external symbol _timeGetTime referenced in function _main ***.obj
and
Error 64 fatal error LNK1120: 1 unresolved externals C:\***
How do I get around this?
Make sure you don’t have
WIN32_LEAN_AND_MEANorMMNOTIMERmacros defined, or the prototype fortimeGetTime()won’t be included inmmsystem.h.Another possibility is that you have some other declaration for
timeGetTime()in one of your headers (or the .c source file) that’s being picked up for some reason instead of the declaration inmmsystem.h.The symbol that should be looked for by the linker is:
not