This topic is now archived and is closed to further replies.


mmsystem.h and winbase.h

Recommended Posts

I was reading a small article on timers and it said that "timeGetTime()" is in mmsystem.h and "QueryPerformanceCounter()" is in winbase.h. I have both libs for these functions but just "#include"ing them creates errors. There are 3 with mmsystem.h and like 75 for winbase.h without even calling anything from them; just inserting the header files. Could anybody please explain why this is happening?

Share this post

Link to post
Share on other sites
Posting the errors you''re getting would be a good start!

1) make sure windows.h is included, preferably before the others.

2) winbase.h will (IIRC) be included by windows.h automatically.

3) when you''re including mmsystem.h, remember to link with winmm.lib.

4) For system headers, use angled brackets for their names #include <windows.h> rather than the quote form #include "windows.h"

5) If you''re using MSVC, make sure the paths set up in the Tools menu are valid.

6) If you''re using a non-MS compiler/linker, make sure you have an up to date version of the Microsoft Platform SDK and your compiler/linker/make are looking at the path where it''s installed.

Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Share this post

Link to post
Share on other sites