Fatal error c1083: cannot open include file

Started by
6 comments, last by wraith811 14 years, 3 months ago
I'm having issues trying to connect my d3d9x file. I'm getting an 'fatal error c1083: cannot open include file: d3d9x: no such file or directory. This is actually my header file. Let me know if there is anything else you need. Thanks. Here is the code: //Header files #define WIN32_EXTRA_LEAN #define DIRECTINPUT_VERSION 0x0800 #include <windows.h> #include <d3d9.h> #include <d3dx9> #include <dinput.h> #include <xinput.h> #include <ctime> #include <iostream> #include <iomanip> using namespace std; //Libraries #pragma comment(lib, "winmm.lib") #pragma comment(lib, "user32.lib") #pragma comment(lib, "gdi32.lib") #pragma comment(lib, "dxguid.lib") #pragma comment(lib, "d3d9.lib") #pragma comment(lib, "d3dx9.lib") #pragma comment(lib, "dinput8.lib") #pragma comment(lib, "xinput.lib") //Program values extern const string APPTITLE; extern const int SCREENW; extern const int SCREENH; extern bool gameover; //Direct3D objects extern LPDIRECT3D9 d3d; extern LPDIRECT3DDEVICE9 d3ddev; extern LPDIRECT3DSURFACE9 backbuffer; //Direct3D functions bool Direct3D_Init(HWND hwnd, int width, int height, bool fullscreen); void Direct3D_Shutdown(); LPDIRECT3DSURFACE9 LoadSurface(string filename); void DrawSurface(LPDIRECT3DSURFACE9 dest, float x, float y, LPDIRECT3DSURFACE9 source); //DirectInput objects, devices, and states extern LPDIRECTINPUT8 dinput; extern LPDIRECTINPUTDEVICE8 dimouse; extern LPDIRECTINPUTDEVICE8 dikeyboard; extern DIMOUSESTATE mouse_state; extern XINPUT_GAMEPAD controllerx[4]; //DirectInput functions bool DirectInput_init(HWND); void DirectInput_Update(); void DirectInput_Shutdown(); int Key_down(int); int Mouse_Button(int); int Mouse_X(); int Mouse_Y(); void XINPUT_Vibrate(int contNum = 0, int amount = 65535); bool XInput_Controller_Found(); //Game Functions bool Game_Init(HWND window); void Game_Run(HWND window); void Game_End();
Advertisement
Are the include directories in your compiler set up right?
Quote:Original post by Denzin
Are the include directories in your compiler set up right?


How do I check that? Is that under tools/options/VC++directories?
Yes, make sure you have the /include and /libraries directories set up to also read from the direct x sdk.
How can I ensure that I have the directx sdk?
Okay, sorry I did find the directx sdk. However, I found it under the (x86) section of the directx sdk. Is that right? I have a 64bit system. The path appears as: c:program files (x86)\microsoft directx sdk (August 2009)\include.
Is that right? The lib part of the directx sdk is located in the x64 section.
Thanks.
You want to #include <d3dx9.h>, not <d3dx9>.
Quote:Original post by mattd
You want to #include <d3dx9.h>, not <d3dx9>.




Thanks for the help, I appreciate it!

This topic is closed to new replies.

Advertisement