Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Thu, 15 Jun 2006 14:20:26 +0800,    group: microsoft.public.win32.programmer.directx.sdk        back       


Using unmanaged DirectX 9 in Visual Studio 2005   
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
date: Thu, 15 Jun 2006 14:20:26 +0800   author:   Thorsten

Re: Using unmanaged DirectX 9 in Visual Studio 2005   
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
date: 15 Jun 2006 07:05:30 -0700   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us