• Advertisement
Sign in to follow this  

Includes?

This topic is 4684 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've just started a new DirectX project and i don't remember where i'm supposed to include the DX files and where i need them... i'm using the DX 9 SDK.

Share this post


Link to post
Share on other sites
Advertisement
Check out this MSDN page for info on how to setup your compiler. However, if you have already created one DX9 project, it's probably already setup. In that case, just include the standard headers (D3D9.h, D3DX9.h).

Share this post


Link to post
Share on other sites
I've done all that already, it's just the header files i need to include, i don't remember where i need to put them

Share this post


Link to post
Share on other sites
im not sure what your asking

the dx header files are incuded like all other headers (include it from DXSDKDir/Include/ or just make this in your compiler options)

the DXlibs is the same (DXSDXDir/Lib/ or options)

Share this post


Link to post
Share on other sites
You include them in any file that is using anything defined in a header file. For example if x.cpp you use an IDirect3DDevice object, then you need to include d3d9.h, but you don't have to include dinput.h, because it has nothing to do with idirect3ddevice.

Share this post


Link to post
Share on other sites
well right now, i have all the correct files linked to the include and lib thing and i'm including them in the according places but it's saying:
"fatal error LNK1181: cannot open input file 'd3d9.h,'"
same for the d3dx9.h file

Share this post


Link to post
Share on other sites
Don't know if this will help, but you might check to see if the DX include directories are in the project's search directory list for includes (same thing for libraries). The list of directories for the compiler to search for includes and libraries are in the project options somewhere. Sorry I can't be more specific but I switched from C++ to C# a while ago and have forgotten the IDE for C++.

Share this post


Link to post
Share on other sites
i did, everything is in the search files, under Vc++ directories for the include and the library files. but it still says it can't see them. even when i put it directly in the code and inside my own project folder and include it, it still says it doesn't see it...

Share this post


Link to post
Share on other sites
Quote:
Original post by EvilKnuckles666
well right now, i have all the correct files linked to the include and lib thing and i'm including them in the according places but it's saying:
"fatal error LNK1181: cannot open input file 'd3d9.h,'"
same for the d3dx9.h file

I could be wrong, but it sounds like you're trying to link the header files. You include headers (.h) and link to libs (.lib). Wherever you set the files to link (either project settings or in code with #pragmas) make sure you're linking to d3d9.lib, not d3d9.h.

Share this post


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

  • Advertisement