🔒 Locked
d3d9.h... error
Advertisement
Original Post
I get this error when i try to compilemy code
I downloaded the sdk update thing and i searched my files for it and i dont have this include... Does anymore know where i can download just this header.
fatal error C1083: Cannot open include file: ''d3d9.h'': No such file or directory
Error executing cl.exe
Ok i got that error fixed now i have a series of new errors im new to directx... Just checking out a demo and it wont compiler i keep getting these errors.
c:\C++\DIRECTX\INCLUDE\dsound.h(305) : error C2146: syntax error : missing '';'' before identifier ''dwReserved1''
c:\C++\DIRECTX\INCLUDE\dsound.h(305) : error C2501: ''DWORD_PTR'' : missing storage-class or type specifiers
c:\C++\DIRECTX\INCLUDE\dsound.h(305) : error C2501: ''dwReserved1'' : missing storage-class or type specifiers
c:\C++\DIRECTX\INCLUDE\dsound.h(306) : error C2146: syntax error : missing '';'' before identifier ''dwReserved2''
c:\C++\DIRECTX\INCLUDE\dsound.h(306) : error C2501: ''DWORD_PTR'' : missing storage-class or type specifiers
c:\C++\DIRECTX\INCLUDE\dsound.h(306) : error C2501: ''dwReserved2'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(29) : error C2146: syntax error : missing '';'' before identifier ''pdidDevice''
..\..\common\DIUtil.h(29) : error C2501: ''LPDIRECTINPUTDEVICE8'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(29) : error C2501: ''pdidDevice'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(40) : error C2146: syntax error : missing '';'' before identifier ''m_pDI''
..\..\common\DIUtil.h(40) : error C2501: ''LPDIRECTINPUT8'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(40) : error C2501: ''m_pDI'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(44) : error C2146: syntax error : missing '';'' before identifier ''m_diaf''
..\..\common\DIUtil.h(44) : error C2501: ''DIACTIONFORMAT'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(44) : error C2501: ''m_diaf'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(51) : error C2061: syntax error : identifier ''LPDIRECTINPUTDEVICE8''
..\..\common\DIUtil.h(58) : error C2061: syntax error : identifier ''DIACTIONFORMAT''
..\..\common\DIUtil.h(59) : error C2061: syntax error : identifier ''DIACTIONFORMAT''
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(93) : error C2146: syntax error : missing '';'' before identifier ''m_diafGame''
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(93) : error C2501: ''DIACTIONFORMAT'' : missing storage-class or type specifiers
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(93) : error C2501: ''m_diafGame'' : missing storage-class or type specifiers
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(94) : error C2146: syntax error : missing '';'' before identifier ''m_diafBrowser''
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(94) : error C2501: ''DIACTIONFORMAT'' : missing storage-class or type specifiers
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(94) : error C2501: ''m_diafBrowser'' : missing storage-class or type specifiers
Error executing cl.exe.
c:\C++\DIRECTX\INCLUDE\dsound.h(305) : error C2146: syntax error : missing '';'' before identifier ''dwReserved1''
c:\C++\DIRECTX\INCLUDE\dsound.h(305) : error C2501: ''DWORD_PTR'' : missing storage-class or type specifiers
c:\C++\DIRECTX\INCLUDE\dsound.h(305) : error C2501: ''dwReserved1'' : missing storage-class or type specifiers
c:\C++\DIRECTX\INCLUDE\dsound.h(306) : error C2146: syntax error : missing '';'' before identifier ''dwReserved2''
c:\C++\DIRECTX\INCLUDE\dsound.h(306) : error C2501: ''DWORD_PTR'' : missing storage-class or type specifiers
c:\C++\DIRECTX\INCLUDE\dsound.h(306) : error C2501: ''dwReserved2'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(29) : error C2146: syntax error : missing '';'' before identifier ''pdidDevice''
..\..\common\DIUtil.h(29) : error C2501: ''LPDIRECTINPUTDEVICE8'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(29) : error C2501: ''pdidDevice'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(40) : error C2146: syntax error : missing '';'' before identifier ''m_pDI''
..\..\common\DIUtil.h(40) : error C2501: ''LPDIRECTINPUT8'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(40) : error C2501: ''m_pDI'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(44) : error C2146: syntax error : missing '';'' before identifier ''m_diaf''
..\..\common\DIUtil.h(44) : error C2501: ''DIACTIONFORMAT'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(44) : error C2501: ''m_diaf'' : missing storage-class or type specifiers
..\..\common\DIUtil.h(51) : error C2061: syntax error : identifier ''LPDIRECTINPUTDEVICE8''
..\..\common\DIUtil.h(58) : error C2061: syntax error : identifier ''DIACTIONFORMAT''
..\..\common\DIUtil.h(59) : error C2061: syntax error : identifier ''DIACTIONFORMAT''
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(93) : error C2146: syntax error : missing '';'' before identifier ''m_diafGame''
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(93) : error C2501: ''DIACTIONFORMAT'' : missing storage-class or type specifiers
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(93) : error C2501: ''m_diafGame'' : missing storage-class or type specifiers
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(94) : error C2146: syntax error : missing '';'' before identifier ''m_diafBrowser''
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(94) : error C2501: ''DIACTIONFORMAT'' : missing storage-class or type specifiers
C:\Dx90sdk\Samples\C++\Demos\Donuts4\inputmanager.h(94) : error C2501: ''m_diafBrowser'' : missing storage-class or type specifiers
Error executing cl.exe.
From the look of your errors, it seems you are not setting your include path correctly and also not setting your libraries and linker paths correctly either. (it looks like you are missing some standard windows libraries as well). you should have d3d9.lib d3dx9dt.lib in your linker along with any other libraries (probably the default libraries) and the following directories should be in your project settings:
linker:
Drive:\DX90SDK\Lib
Compiler:
Drive:\DX90SDK\Include
linker:
Drive:\DX90SDK\Lib
Compiler:
Drive:\DX90SDK\Include
You may also need a recent version of the Platform SDK. The one that ships with VC 6 is ancient. It''s a free download and if you only grab the core it isn''t too big.
(And remember to add the new platform SDK paths above the default VC paths)
Stay Casual,
Ken
Drunken Hyena
(And remember to add the new platform SDK paths above the default VC paths)
Stay Casual,
Ken
Drunken Hyena
quote:
Original post by cablenewt
anyone know what the problem is?
It looks like you didn''t bother to install the SDK to me. If you did uninstall it. Make sure all Visual Studio apps are closed and install it again.
Make sure its this version you''re using.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement