Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DirectX in Windows 8 SDK

Tags:

winapi

directx

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.

like image 805
Gabriel Southern Avatar asked Feb 17 '23 04:02

Gabriel Southern


1 Answers

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 and d3dx*.lib files and merged remains to Windows 8 SDK.

So, to build samples you must use:

  • For DirectX headers/libs: old standalone DirectX SDK (Jun 2010)
  • For other Windows headers/libs: Windows 7 SDK -OR- Windows 8 SDK in "XP mode" (Project Properties -> General -> Platform Toolset -> v110_xp )

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.

like image 71
Ivan Aksamentov - Drop Avatar answered Feb 20 '23 03:02

Ivan Aksamentov - Drop