Jump to content
  • Advertisement
Sign in to follow this  
wraith811

Fatal error c1083: cannot open include file

This topic is 3096 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'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();

Share this post


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

Share this post


Link to post
Share on other sites
Yes, make sure you have the /include and /libraries directories set up to also read from the direct x sdk.

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!