Sign in to follow this  
Helderash

Microsoft Platform SDK Compile Errors

Recommended Posts

Hey folks! Im building a small 2D tile based games engine using DirectX 9, to develop a few simple games such as tic tac toe using sprites (Im using a cut-down version of Jim Adams' engine from Programming Role Playing Games in DirectX). I've a small test programme to test the engine, but on compilation I receieve the following errors: c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64' c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer' c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Im not so sure if this is due to an incorrect option selected somewhere, or something else. If anyone needs to take a peek at my code, I'll be more than happy to submit it (though it is rather lengthy). Thankyou in advance for any help, it is really appreciated.

Share this post


Link to post
Share on other sites
Besides the three default includes, I have:

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
C:\DX90SDK\Include

Share this post


Link to post
Share on other sites
OK, the problem seems to be that Winnt.h is including basetsd.h, but the version of basetsd.h that comes with DirectX is being used rather than that in the Platform SDK.

One fix would be to change the line
#include <basetsd.h>
in winnt.h to point explicitly at basetsd.h in Platform SDK\Include.

Share this post


Link to post
Share on other sites
Aha okay, thankyou very much!

In winnt.h I see the line #include <basetsd.h>. How do I make it explicitly point to the microsoft SDK version?

I guess i need to brush up on my C++ :(

Share this post


Link to post
Share on other sites
Either overwrite the one you want with the one you don't, or make sure "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" is listed before "C:\DX90SDK\Include" in the include folders list.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this