Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Windows SDK 8.1 for development on Windows 7

Can I install Windows SDK for Windows 8.1 on my computer with Windows 7 and use its libraries for development? Specifically I'd like to use the Direct3D libraries/headers.

like image 840
pseudomarvin Avatar asked May 06 '15 19:05

pseudomarvin


2 Answers

The Windows SDK for Windows 8.1 supports building Windows desktop applications for Windows Vista, Windows 7, Windows 8, Windows 8.1, and the Windows Server equivalents of each. All that matters is that you correctly set _WIN32_WINNT to the proper value for your target application:

  • For Windows 8.1 support, _WIN32_WINNT is 0x0603 which is the default with the Windows 8.1 SDK / VS 2013 and is the value you expect to use for Windows Store apps for Windows 8.1 and Windows phone 8.1.

  • For Windows 8.x support, _WIN32_WINNT is 0x0602 which is the default with the Windows 8.0 SDK / VS 2012 and is the value you expect to use for Windows Store apps for Windows 8.0, Windows phone 8.0, and Xbox One.

  • For Windows 7 and Windows 8.x Win32 desktop support, _WIN32_WINNT should be 0x0601.

  • For Windows Vista, Windows 7, and Windows 8.x Win32 desktop support, _WIN32_WINNT should be 0x0600.

See Using Windows Headers

The Windows SDK for Windows 8.1 comes with VS 2013, the Windows SDK for Windows 8.0 comes with VS 2012. To use the Windows SDK for Windows 8.1 with VS 2012 or VS 2010, you need to make use of a Properties Pages solution because there's no automatic integration otherwise. See the Visual C++ Team Blog and this blog post which has the required .props files attached.

The Windows SDK for Windows 8.x contain the DirectX headers for Direct3D 9, Direct3D 10.x, Direct3D 11.x, DirectSound, DirectInput, DirectDraw, core DirectMusic, DirectShow, XInput 1.4 or 9.1.0, and XAudio 2.8. For a complete catalog, see DirectX SDKs of a certain age.

Legacy DirectX SDK: As per MSDN, a number of components from the legacy DirectX SDK are deprecated and are not part of the Windows 8.x SDK. In fact, the DirectX SDK itself is deprecated. Notably D3DX9, D3DX10, D3DX11, and XACT. For modern alternatives that do not require the legacy DirectX SDK, see Living Without D3DX.

If you need to use D3DX, XACT, XInput 1.3, or XAudio 2.7, then you can use the legacy DirectX SDK in combination with the Windows 8.x SDK, but you need to switch the order of the include/lib paths around from VS 2010. See the MSDN page for details. See also XInput and XAudio2 for additional recommendations here.

Windows XP: If you have to target Windows XP, you have to use the Windows 7.1A SDK and the special Platform Toolset for it. You will also need the legacy DirectX SDK particularly for HLSL compiler D3DCompile #43. See this post for important notes particularly for DirectX development.

Deployment: If you use the Windows SDK for Windows 8.1 and use the HLSL complier or other D3DCompile APIs at runtime, you need to deploy the required DLL. See HLSL, FXC, and D3DCompile. Everything else is included in the operating system itself. If you make use of any of the deprecated legacy DirectX SDK components such as D3DX9, D3DX10, D3DX11, XInput 1.3, or XAudio 2.7, then you still need the legacy DirectSetup package. Be sure to read Not So Direct Setup.

Related: DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, The Zombie DirectX SDK

like image 194
Chuck Walbourn Avatar answered Nov 17 '22 23:11

Chuck Walbourn


So yes you can do it. In Visual Studio 2013 Windows SDK 8.1 which contains direct3d is included by default.

like image 44
pseudomarvin Avatar answered Nov 17 '22 23:11

pseudomarvin