Hi I encountered some problem to convert my VS 2003 project to VS 2005. My Project is written in MC++ and uses DirectX 9 (DSound and DShow). In VS 2003 it runs fine but in VS 2005 I get lots of errors in the Winnt.h file, some are : Error 1 error C2146: syntax error : missing ';' before identifier 'PVOID64' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\winnt.h 222 Error 2 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 222 Error 3 error C2146: syntax error : missing ';' before identifier 'Buffer' C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\winnt.h 5940 Error 4 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 5940 Error 5 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 5940 Then I tried to build a little sample project like below with only one class. It compiles fine but as soon as I include DSound.h I get the errors shown above. #pragma once #include <dsound.h> using namespace System; namespace DirectXTest { public ref class Class1 { // TODO: Add your methods for this class here. }; } At google I found a solution that says to change the include order of my Solution so that the Platform SDK\Include gets loaded first. Unfortunately that doesn't do the job for me. I tried to changed the following settings: Tools>Options>Project and Solutions>VC++ Directories Include files ...\VS 8\VC\ PlatformSDK \Include $(VCInstallDir) PlatformSDK \lib Library files $(VCInstallDir)PlatformSDK\lib So can any one please tell me what compiler settings I have to change that I can compile my project again under VS 2005? Does it matter if both Visual Studio 2003 and 2005 is installed at the same time? Thanks for any help!!!!!!!!! Thorsten Here are also my command line settings for the proper project: C\C++: /Od /I "C:\Documents and Settings\Thorsten\My Documents\Visual Studio Projects\DirectX" /I "C:\Documents and Settings\Thorsten\My Documents\Visual Studio Projects\DirectX\Avi Writer" /I "C:\DXSDK\Include" /D "WIN32" /D "_DEBUG" /D "_Trace" /D "_VC80_UPGRADE=0x0710" /D "_WINDLL" /D "_MBCS" /FD /EHa /MDd /Yu"stdafx.h" /Fp"Debug\DirectXWrapper.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Zi /clr:oldSyntax /TP /errorReport:prompt /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll" Linker: /OUT:"C:\Documents and Settings\Thorsten\My Documents\Visual Studio 2005\Projects\DirectX Test\Debug\DirectXWrapper.dll" /INCREMENTAL /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Debug\DirectXWrapper.dll.intermediate.manifest" /DEBUG /ASSEMBLYDEBUG /PDB:"c:\Documents and Settings\Thorsten\My Documents\Visual Studio 2005\Projects\DirectX Test\debug\DirectXWrapper.pdb" /FIXED:No /ERRORREPORT:PROMPT dsound.lib dxguid.lib dxerr9.lib Strmiids.lib Quartz.lib comsupp.lib odbc32.lib odbccp32.lib mscoree.lib msvcrtd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Thorsten a écrit : > Hi > > > > I encountered some problem to convert my VS 2003 project to VS 2005. My > Project is written in MC and uses DirectX 9 (DSound and DShow). In VS 2003 > it runs fine but in VS 2005 I get lots of errors in the Winnt.h file, some yea it seems that previous m$ compiler were too tolerents, Are the win headers fixed somewhere ? > Error 1 error C2146: syntax error : missing ';' before > identifier 'PVOID64' C:\Program Files\Microsoft Visual Studio > 8\VC\PlatformSDK\Include\winnt.h 222 I did not find any other solution to hack the winnt.h : typedef void* PVOID; // #~rzr{ // typedef void * POINTER_64 PVOID64; // #~rzr- // syntax error : missing ';' before identifier 'PVOID64' // typedef void * void * STUPID; // error C2062: type 'void' unexpected typedef void* POINTER_64 ; //#~rzr //workaround here typedef void* PVOID64; //#~rzr //workaround here // #~rzr} > Error 2 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 222 // operator=(LONG); //~rzr- LONG operator=(LONG); //~rzr Are there some communities who provide a better SDK ? Else we could start to collect C books for the richest men of the world .... OK Enough said now