We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2178

Summary: Building SDL fails on Windows 8.1 unless June 2010 DirectX SDK is installed
Product: SDL Reporter: Justin Skiles <justin.d.skiles>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: x86_64   
OS: Windows 8   

Description Justin Skiles 2013-10-23 22:51:52 UTC
I attempted to build the latest stable release (2.0.0) on Windows 8.1 with Visual Studio 2012 and the SDL_VS2012 solution.

Errors were indicated in "SDL_xaudio2.c" because "dxsdkver.h" cannot be found in the SDK includes. In Windows 8 and 8.1, Microsoft has merged the DirectX SDK into the Windows SDK which has resulted in various header file migrations, deletions, renames, and restructuring. The only way to resolve the build errors was to install the old June 2010 DirectX SDK.


When I asked if this file was moved or replaced, I was given this response by Chuck Walbourn at Microsoft:

http://social.msdn.microsoft.com/Forums/windowsapps/en-US/ca03a834-1108-4767-b19c-773cfd8a47e5/is-dxsdkverh-header-file-missing-from-the-windows-sdk-as-of-8-and-81?forum=windowssdk#ca03a834-1108-4767-b19c-773cfd8a47e5

----
You should remove the reference to dxsdkver.h. All it contained were the following #defines:

_DXSDK_PRODUCT_MAJOR
_DXSDK_PRODUCT_MINOR
_DXSDK_BUILD_MAJOR
_DXSDK_BUILD_MINOR

For more information on moving from the legacy DirectX SDK to the Windows 8.x SDK, see
http://blogs.msdn.com/b/chuckw/archive/2012/08/22/directx-sdk-s-of-a-certain-age.aspx
http://blogs.msdn.com/b/chuckw/archive/2013/07/01/where-is-the-directx-sdk-2013-edition.aspx
http://blogs.msdn.com/b/chuckw/archive/2013/08/21/living-without-d3dx.aspx
----

Additionally, the "DXSDK_DIR" macro that is used in the SDL2 Visual Studio project's Additional Include Directories is invalid under the Windows SDK in Windows 8 and 8.1. The new macro is "WindowsSDK_IncludePath".
Comment 1 Sam Lantinga 2013-11-11 01:44:49 UTC
We actually need to build with the older DirectX SDK in order to run on Windows versions older than Windows 8.  I updated the code so this is apparent when people go to look at it.

Feel free to attach a patch that fixes things for people who want to only run on Windows 8 and newer if you want.

Cheers!