Summary: Should directX include files be removed from applications targeting Windows 8?
Details:
I'm new to developing in Windows and I'm trying to get the NVIDIA SDK to compile on Windows 8 with Visual Studio 2012 (if possible). When compiling I've gotten an error message: Cannot open include file: 'd3dx9.h': No such file or directory
.
I've read the Where is the DirectX SDK? article, but I'm confused about what it is saying to do.
Assuming that I don't care about Windows 7 and only want to test desktop applications on Windows 8 (ignoring Metro for now), do I need to keep the includes such as #include <d3dx9.h>
and #include <d3dx11.h>
that are in the NVIDIA SDK app, or should I remove these includes? If I do keep them what do I need to install so that the files can be found.
These samples was intended to be built with DirectX SDK and Windows SDK (pre-Win8).
However, Microsoft does not recommend to use D3DX* stuff anymore (among others). They deprecated standalone DirectX SDK, stripped
d3dx*.h
andd3dx*.li
b files and merged remains to Windows 8 SDK.So, to build samples you must use:
To prevent mixing headers and libs, it is better to set exact paths to them in "VC++ Directories".
For your own new projects it is better not to use DirectX SDK, but use DirectX headers from Windows 8 SDK.
Make sure that you get the latest DirectX SDK. It has the header files.
Try to follow this step, hope this ll solve ur problem
Link the Include and Library directories
Go the the folder where you have installed DirectX SDK. If nothing is changed, it will be in
Type the Following code at the top of the file to include the Direct3D header files:
14. Well that's all. You need to do this to configure DirectX for Visual C++ 2012 Project.
You can take a look from here
d3dx11.h missing?
and
Cannot open include file "d3dx9.h"
Thanks !!!