c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5932) : error C2146: syntax error : missing ';' before identifier 'Buffer'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5932) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5932) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Could someone tell me what i have done wrong and why the new compiler doesn't want to understand simple declerations

winnt.h errors?
Tutnik
Stefan_N
The errors started with the following line in winnt.h:
winnt.h(222) typedef void * POINTER_64 PVOID64;
So I changed the line to:
winnt.h(222) typedef void * POINTER_64,* PVOID64;
then everything compiled and ran.
But why should this work Is there somthing about typedef that I am not understanding
akinbahri
struct blah
{
int whatever;
} <--- missing semicolon!
Greggers
This seems to have been my problem as well. I opened the offending winnt.h and changed the include for "basetsd.h" to explicitly point to "C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\BaseTsd.h", and that particular error went away. Now to figure out what's goofing up my include search path so I can fix it the right way... Thanks for the info!!
SusanBaroody
The only includes i have is including direct X 9:
#include
<d3dx9.h>So either it is included in the direct X library (most likely) and something befor it is missing a semi-colon or it is being included by the compiler and may not be entirely nessesary to the project anyway (less likely I think).
Befor the errors you get the following declerations: So it may be a problme with a colon missing in basetsd.h
#include
<basetsd.h>#if (defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64)) && !defined(MIDL_PASS)
#define DECLSPEC_IMPORT __declspec(dllimport)
#else
#define DECLSPEC_IMPORT
#endif
#ifndef DECLSPEC_NORETURN
#if (_MSC_VER >= 1200) && !defined(MIDL_PASS)
#define DECLSPEC_NORETURN __declspec(noreturn)
#else
#define DECLSPEC_NORETURN
#endif
#endif
#ifndef DECLSPEC_ALIGN
#if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
#define DECLSPEC_ALIGN(x) __declspec(align(x))
#else
#define DECLSPEC_ALIGN(x)
#endif
#endif
#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
#if defined(_AMD64_) || defined(_X86_)
#define SYSTEM_CACHE_ALIGNMENT_SIZE 64
#else
#define SYSTEM_CACHE_ALIGNMENT_SIZE 128
#endif
#endif
#ifndef DECLSPEC_CACHEALIGN
#define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE)
#endif
#ifndef DECLSPEC_UUID
#if (_MSC_VER >= 1100) && defined (__cplusplus)
#define DECLSPEC_UUID(x) __declspec(uuid(x))
#else
#define DECLSPEC_UUID(x)
#endif
#endif
#ifndef DECLSPEC_NOVTABLE
#if (_MSC_VER >= 1100) && defined(__cplusplus)
#define DECLSPEC_NOVTABLE __declspec(novtable)
#else
#define DECLSPEC_NOVTABLE
#endif
#endif
#ifndef DECLSPEC_SELECTANY
#if (_MSC_VER >= 1100)
#define DECLSPEC_SELECTANY __declspec(selectany)
#else
#define DECLSPEC_SELECTANY
#endif
#endif
#ifndef NOP_FUNCTION
#if (_MSC_VER >= 1210)
#define NOP_FUNCTION __noop
#else
#define NOP_FUNCTION (void)0
#endif
#endif
#ifndef DECLSPEC_ADDRSAFE
#if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64))
#define DECLSPEC_ADDRSAFE __declspec(address_safe)
#else
#define DECLSPEC_ADDRSAFE
#endif
#endif
#ifndef DECLSPEC_NOINLINE
#if (_MSC_VER >= 1300)
#define DECLSPEC_NOINLINE __declspec(noinline)
#else
#define DECLSPEC_NOINLINE
#endif
#endif
#ifndef FORCEINLINE
#if (_MSC_VER >= 1200)
#define FORCEINLINE __forceinline
#else
#define FORCEINLINE __inline
#endif
#endif
#ifndef DECLSPEC_DEPRECATED
#if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
#define DECLSPEC_DEPRECATED __declspec(deprecated)
#define DEPRECATE_SUPPORTED
#else
#define DECLSPEC_DEPRECATED
#undef DEPRECATE_SUPPORTED
#endif
#endif
#ifdef DEPRECATE_DDK_FUNCTIONS
#ifdef _NTDDK_
#define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED
#ifdef DEPRECATE_SUPPORTED
#define PRAGMA_DEPRECATED_DDK 1
#endif
#else
#define DECLSPEC_DEPRECATED_DDK
#define PRAGMA_DEPRECATED_DDK 1
#endif
#else
#define DECLSPEC_DEPRECATED_DDK
#define PRAGMA_DEPRECATED_DDK 0
#endif
//
// Void
//
typedef void *PVOID;
typedef void * POINTER_64 PVOID64;
The errors accure on the bottom two lines
curwiler
Please post a small sample of code and a description of what you're trying to do.
Dejan Vesic
Yes, POINTER_64 is supposed to be be defined as a macro that expands to __ptr64 which a magic keyword that newer Microsoft compilers understand. It changes the size of the pointer to 64-bits even when compiling 32-bit code. It's not safe to make the change you made because it defines PVOID64 as a 32-bit pointer instead of a 64-bit pointer as intended. This error message either indicates that you're using and old compiler or that there's something wrong with your include files. Try moving the Windows SDK include directory to the start of your include search path, you might be picking up incompatible headers from different directories.
Kode Hunt
Thierry Lam
I've seen these sorts of errors on various forums now, and it usually seems to be with people not having a suitable version of the PSDK - upgrading it as appropriate (or, in the case of VC++6 downgrading the DX-SDK) from here is my suggestion.
It does seem odd that the latest VStudio is causing you problems, and I could be wrong - but that download should analyse your current setup and determine if/what needs upgrading, so it *shouldn't* do you any harm..
I never dug into it in too much detail, but I did see a post that suggested the various errors are due to a number of typedef and/or #define statements being eliminated and thus leaving "gaps" that confuse the compiler.
hth
Jack
dustin551
Stephane Beauchemin
You'r 100% right, older versions of DX9 sdk (DX9b sdk) has it's own BaseTsd.h file, go into your visual studio folder, and extract basetsd.h and overwrite the one in dx9sdk, compiles perfectly, thanks
Regards bear
CoolCoolMan