Jump to content
  • Advertisement


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


mmsystem.h and winbase.h

This topic is 5451 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!