Skip to main content
gamedev.net
🔒 Locked

d3d9.h... error

Started by cablenewt 12 replies 2.6k views
Original Post
cablenewt
cablenewt
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
cablenewt
cablenewt
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.
protemus
protemus
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

-- * The source of all my problems is in the source * --
cablenewt
cablenewt
Well those are all correct... I am using Vc++ 6... No clue what problem is
henrym
henrym
Make sure those paths are at the top of the list.

VC searches for the header file you want from the top down, so if you have any duplicate headers it may be including the wrong one.
DrunkenHyena
DrunkenHyena
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
Stay Casual,KenDrunken Hyena</FON
jitspoe
jitspoe
Do you have one of your own headers included before the dx9 header? At first glance it looks like you''re forgetting a semicolon at the end of a class. Unfortunately that will give you errors in the wrong files.
cablenewt
cablenewt
Those errors are gone now i have a new one GRRR...

LINK : fatal error LNK1104: cannot open file "d3dx9.lib"
Error executing link.exe.
cablenewt
cablenewt
anyone know what the problem is?
Etnu
Etnu
Did you copy the dx header / lib files to your Visual Studio directory''s header / lib directories?

He that is not busy born is busy dying.
---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.
superpig
superpig
quote:
Original post by cablenewt
anyone know what the problem is?


You''ll usually find the answers you need in the Forum FAQ...
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse
cablenewt
cablenewt
Well that did not help... ty neways. I am just doing this to see if my compiler works...
Kafeen
Kafeen
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.
cablenewt
cablenewt
Welp still having the same problem.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.