Unable to build native Win32 apps

I am using Visual Studio 2005.

< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 

I get error messages when I build a native Win32 app in Visual C++ .Net 2005

 

The first error is

 

d:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'

 

 

This is the line:

 

typedef void * POINTER_64 PVOID64;

 

How can there be an error in winnt.h

 

Anyway, I changed the line to

 

typedef void *PVOID64;

 

The remaining errors didn't occur anymore. Now there are no errors. But this is obviously not the solution right

 

What is the problem Why am I getting this error, that too in a file written by (I think) professionals

 

Is there any setting that I should change in VS .Net I have reinstalled VS .Net and (sometime even after erasing hard disk due to XP problems), I get the same error messages.

 

But I am able to do it without errors in the VC++ .Net 2002 version!

 

Can someone help me with this




Answer this question

Unable to build native Win32 apps

  • Keith Buik

    To Brian:

    No problem - you not having time to answer my last question.

    Its OK, since I solved my problem anyway!

    Thanks guys for spending your time to help me out



  • Allan Hirt

    I don't think winnt.h was intended to be included directly. Try #include "windows.h"

    Brian


  • MohammadSamara

    I'm glad you got to the bottom of it. Sorry I didn't find time to reply to your last question!
  • Alexey Monastyrsky

    If the compiler in the new visual studio is like it used to be (in older versions), it might still have bugs where it will display "ghost" errors that aren't really there. Typically, I recompiled on a different machine, and the error was gone.

    -Ron


  • CapitanMiki

    Did you change the include paths under Tools, Options, Directories
  • bobthebob

    My problem is solved!

    Joshep, thanks for your reply. I was able to reset the VC++ Directories

    Brian Kramer, Thanks for your reply. Changing the VC++ directories was the problem! I reset them with the help of the above reply

    Thanks a lot for the help guys!



  • basmar

    Oh!

    I don't remember, but I think I did

    Can you tell me the default directories

    Is there any way by which I could Reset them

    Thanks!



  • AdamCCC

    Actually, it is not included directly. As you told, only windows.h is included in stdafx.h

    I get these errors even if I use the wizard from the New Project to create a Win32 application.

    I didn't change anything and simply built the resulting project from the wizard.

    Even then I get these errors!



  • Carlos Figueroa

    to reset them, delete the VCComponents.dat file from your appdata local settings directory

    josh

    VC++ project system developer



  • Unable to build native Win32 apps