Monday, July 27, 2009

How to include windows.h correctly?

I am using VC++ 2005 standard edition and tried using #include %26lt;windows.h%26gt;


in my project but there are a list of errors with the description:


"error C2872: 'IUnknown' : ambiguous symbol C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\unknwn.h "





I found that the windows.h file is in the C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK directory. The project has also included the $(VCInstallDir)\PlatformSDK\lib, \include and \bin lines in the project options window.





How to include windows.h correctly?

How to include windows.h correctly?
Is the program failing on the include? Did you try a simple console program, that does nothing but include windows.h? There is nothing more to it than #include %26lt;windows.h%26gt; and then linking the appropriate libraries.
Reply:Try #include "windows.h"?


No comments:

Post a Comment