Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cablenewt

d3d9.h... error

This topic is 5278 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Those errors are gone now i have a new one GRRR...

LINK : fatal error LNK1104: cannot open file "d3dx9.lib"
Error executing link.exe.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!