PDA

View Full Version : Consultant has compiler error-- can you help?


Raptisoft
12-24-2005, 11:31 AM
Hi all,

I've hired a consultant. However, he can't get my code framework to compile-- instead he gets a really weird error, saying:

F:\Program Files\Microsoft Platform SDK\Include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'

Now, we googled this error, and the biggest suggestionto fix it is to juggle the order of the include directory paths. However, this doesn't fix the problem in our case.

Can anyone help? The consultant is using Visual Studio Express with the optimizing patch installed.

Thank you very much, you guys are great, you're all the best, and other platitudes.

GameStudioD
12-24-2005, 12:54 PM
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=63785&SiteID=1

http://www.codecomments.com/VC_Language/message716133.html

These links talk about a similar problem. When the swapping the include directory order did not work, some people actually modified some of the Platform SDK files.

Huge
12-26-2005, 08:15 PM
To debug this, you can preprocess to a file, using (I think) the /P flag.
You can then look at the created file (.i I think) and see exactly what
the pre-processor is doing. You will probably find one of microsofts
"helpful" #defines (eg #define SetText SetTextA).
Also, along the line of moving include paths, try moving you "#include"
statements. ie, #include<windows.h> as your first include. Try with
or without #define WINDOWS_LEAN_AND_MEAN.
Check your #define MSC_VER too - ie, make sure you are compiling to
windows 98+ boxes, not windows95 etc. PVOID64 looks like a 64-bit
target - there might be a project switch for this.

arcadetown
12-27-2005, 01:26 PM
Check if there's a difference in your VC++ config settings between your system and his system. Remember there's settings in tools/options (or something like that) and your project. Since the project file is the same (correct?) it's probably in your tools/options. Seen similar before and also was that system's config settings being different.

Cuculain
12-28-2005, 01:18 AM
I had the very same problem and I think I solved it by moving the PlatformSDK lines to the top in the VC++ Directories or something similar.

Ricardo Vladimiro
12-28-2005, 01:27 AM
I have no idea if this helps, but I fought a similar problem last night and what was happening was that i forgot a ; at the end of a function prototype of one of the header files. It's probably not this but it should be fast to check. Hope this helps.

lennard
03-06-2007, 09:05 AM
Add:

$(VCInstallDir)PlatformSDK\include

to your configuration properties/c/c++/general additional include directories entry

additionally adding this to my command line options got the beast to quiet down a bit about things like sprintf being used:


/D "_CRT_SECURE_NO_DEPRECATE"