Includes?

Started by
8 comments, last by DrunkenHyena 19 years ago
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.
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
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).
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
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
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
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)
-------------------------------------------------------------------"Debugging is twice as hard as writing the code in the first place.Therefore, if you write the code as cleverly as possible, you are,by definition, not smart enough to debug it." - Brian W. Kernighan
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.
[size=2]aliak.net
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
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
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++.
//Good enough is good enough//Better is worse//Perfect is fundamentally flawed
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...
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
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.
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement