简体   繁体   English

使用Windows SDK 8.1在Windows 7上进行开发

[英]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? 我可以在装有Windows 7的计算机上安装Windows SDK for Windows 8.1并使用其库进行开发吗? Specifically I'd like to use the Direct3D libraries/headers. 具体来说,我想使用Direct3D库/头文件。

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. 适用于Windows 8.1Windows SDK支持为Windows Vista,Windows 7,Windows 8,Windows 8.1以及每个Windows Server等效Windows Server应用程序构建Windows桌面应用程序。 All that matters is that you correctly set _WIN32_WINNT to the proper value for your target application: 重要的是您正确地将_WIN32_WINNT设置为目标应用程序的正确值:

  • 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. 对于Windows 8.1支持, _WIN32_WINNT是0x0603,这是Windows 8.1 SDK / VS 2013的默认值,是您希望用于Windows 8.1和Windows Phone 8.1的Windows应用商店应用的值。

  • 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. 对于Windows 8.x支持, _WIN32_WINNT是0x0602,这是Windows 8.0 SDK / VS 2012的默认值,是您希望用于Windows 8.0,Windows Phone 8.0和Xbox One的Windows应用商店应用的值。

  • For Windows 7 and Windows 8.x Win32 desktop support, _WIN32_WINNT should be 0x0601. 对于Windows 7和Windows 8.x Win32桌面支持, _WIN32_WINNT应为_WIN32_WINNT

  • For Windows Vista, Windows 7, and Windows 8.x Win32 desktop support, _WIN32_WINNT should be 0x0600. 对于Windows Vista,Windows 7和Windows 8.x Win32桌面支持, _WIN32_WINNT应为0x0600。

See Using Windows Headers 请参阅使用Windows标头

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. Windows SDK for Windows 8.1附带VS 2013, Windows SDK for Windows 8.0附带VS 2012.要使用Windows SDK for Windows 8.1与VS 2012或VS 2010,您需要使用属性页解决方案,因为没有否则自动集成。 See the Visual C++ Team Blog and this blog post which has the required .props files attached. 请参阅Visual C ++团队博客和此博客文章 ,其中附有所需的.props文件。

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. 适用于Windows 8.xWindows SDK包含Direct3D 9,Direct3D 10.x,Direct3D 11.x,DirectSound,DirectInput,DirectDraw,核心DirectMusic,DirectShow,XInput 1.4或9.1.0以及XAudio 2.8的DirectX标头。 For a complete catalog, see DirectX SDKs of a certain age . 有关完整目录,请参阅特定年龄的DirectX SDK

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. 旧版DirectX SDK:根据MSDN ,旧版DirectX SDK中的许多组件已弃用,不属于Windows 8.x SDK。 In fact, the DirectX SDK itself is deprecated. 实际上,不推荐使用DirectX SDK本身。 Notably D3DX9, D3DX10, D3DX11, and XACT. 特别是D3DX9,D3DX10,D3DX11和XACT。 For modern alternatives that do not require the legacy DirectX SDK, see Living Without D3DX . 对于不需要传统DirectX SDK的现代替代方案,请参阅不使用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. 如果您需要使用D3DX,XACT,XInput 1.3或XAudio 2.7,那么您可以将旧版DirectX SDK与Windows 8.x SDK结合使用,但是您需要从VS切换include / lib路径的顺序2010.有关详细信息,请参阅MSDN页面。 See also XInput and XAudio2 for additional recommendations here. 另请参阅XInputXAudio2以获取其他建议。

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. Windows XP:如果必须以Windows XP为目标,则必须使用Windows 7.1A SDK和特殊的平台工具集。 You will also need the legacy DirectX SDK particularly for HLSL compiler D3DCompile #43. 您还需要特别针对HLSL编译器D3DCompile#43的旧版DirectX SDK。 See this post for important notes particularly for DirectX development. 有关DirectX开发的重要说明,请参阅此文章

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. 部署:如果您使用Windows SDK for Windows 8.1并在运行时使用HLSL编译器或其他D3DCompile API,则需要部署所需的DLL。 See HLSL, FXC, and D3DCompile . 请参阅HLSL,FXC和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. 如果您使用任何已弃用的旧版DirectX SDK组件(如D3DX9,D3DX10,D3DX11,XInput 1.3或XAudio 2.7),则仍需要旧版DirectSetup软件包。 Be sure to read Not So Direct Setup . 请务必阅读Not So Direct Setup

Related: DirectX SDK Tools Catalog , DirectX SDK Samples Catalog , The Zombie DirectX SDK 相关: DirectX SDK工具目录DirectX SDK样本目录Zombie DirectX SDK

So yes you can do it. 所以是的,你可以做到。 In Visual Studio 2013 Windows SDK 8.1 which contains direct3d is included by default. 在Visual Studio 2013中,默认情况下包含包含direct3d的Windows SDK 8.1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM