Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

timeGetDevCaps fails to link

859 views
Skip to first unread message

jeffareid

unread,
Jul 3, 2009, 7:08:48 PM7/3/09
to
I have a simple demo windows program, that I tried adding
timer info to. This is what I added so far:


static TIMECAPS sTimeCaps;
...
timeGetDevCaps(&sTimeCaps, sizeof(sTimeCaps));

but when I compile with VS 2005 I get this error:

Error 1 error LNK2019:
unresolved external symbol __imp__timeGetDevCaps@8
referenced in function _WinMain@16 DEMO.obj

jeffareid

unread,
Jul 3, 2009, 7:21:29 PM7/3/09
to
> unresolved external symbol __imp__timeGetDevCaps@8
> referenced in function _WinMain@16 DEMO.obj

Problem solved, I had to manually add winmm.lib to the project
build properties linker additional dependencies.

jeffareid

unread,
Jul 4, 2009, 12:16:52 AM7/4/09
to
> Problem solved, I had to manually add winmm.lib to the project
> build properties linker additional dependencies.

or simpler still, add this pragma to the source (forgot about this):

#pragma comment(lib, "winmm.lib") /* include winmm.lib */


0 new messages