# PSDK Compile Errors

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

## Recommended Posts

I just downloaded and installed the Microsoft Platform SDK so I can make WIN32 programs in Visual C++ Express 2005 but when I compile I get these errors. I've looked through my code but I can't find anything that I think is causing them. Does anyone know what's causing them.
TestMain.cpp
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(222) : error
C2146: syntax error : missing ';' before identifier 'PVOID64'
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(222) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(5940) : error
C2146: syntax error : missing ';' before identifier 'Buffer'
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(5940) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(5940) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
D3DApp.cpp
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(222) : error
C2146: syntax error : missing ';' before identifier 'PVOID64'
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(222) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(5940) : error
C2146: syntax error : missing ';' before identifier 'Buffer'
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(5940) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
F:\Program Files\Microsoft Platform SDK\Include\winnt.h(5940) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int

Thanks!

##### Share on other sites
My guess is that you have a #include right before including windows.h, and that has some unterminated code (for example, missing a semicolon at the end of a class definition)

##### Share on other sites
No, windows.h is the first include and my class does have a semi-colon.[DESPRESSED]

##### Share on other sites
Can you make a simplified case which causes the same errors, and then post it? This is usually helpful. Sometimes doing this by itself is enough to answer why it's happening.

It looks like, somehow, POINTER_64 isn't properly defined. Are there any project definitions which might interfere?

##### Share on other sites
Any program that includes
windows.h
has those errors.

##### Share on other sites
are you compiling as 64 bit??

Cheers
Chris

##### Share on other sites
I am having the exact same problem (I was just about to post a new thread!!). I know my code compiles under VC++ 2003, so if anyone can help me out too I'd appreciate it. Using VC++ 2005 Express, PSDK and ant to build (Yes it is possible!!).

##### Share on other sites
Have you copied the Bin, Include, and Lib directories from "C:\Program Files\Microsoft Platform SDK" to "C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK", or are you just trying to get it to use older header files from previous compiler versions?

What I did was create an empty Win32 app and just get that to compile first.

##### Share on other sites
Quote:
 Original post by iMalcHave you copied the Bin, Include, and Lib directories...

They are in my enviornment varibles, the compiler would give out if they were not with an error like "Can't find header"

We don't seem to be the only ones having this problem:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=63785&SiteID=1
http://forums.codeblocks.org/index.php?PHPSESSID=59ae7810ce8a421c0a23336c5725f672&topic=332.msg2399

[google] got a few more too. I got a Hello world to compile. EDIT: that is a win32 hello world, not a cout.

##### Share on other sites
Found a solution:

Also:

http://www.dotnet247.com/247reference/msgs/55/278819.aspx

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=148345&SiteID=1 - This one seems to do the trick

[Edited by - pkelly83 on November 29, 2005 4:01:29 AM]

##### Share on other sites
Quote:
 are you compiling as 64 bit??CheersChris
No, not 64 bit. (can express even do 64 bit?)

So pretty much all I have to do is include this
_WIN32_WINNT>=0x0501WINVER>=0x0501
?

##### Share on other sites
Quote:
 Original post by DigiDudeSo pretty much all I have to do is include this _WIN32_WINNT>=0x0501WINVER>=0x0501?

#define _WIN32_WINNT 0x501
#define _WINVER 0x501
#define POINTER_64 __ptr64

The above workwed for me.

##### Share on other sites
Okay, thanks everyone! I'll try it when I get home, I'm at school right now so I can't.
++ratings

##### Share on other sites

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