Visual Studio 平台工具集与 Windows SDK [英] Visual studio platform toolset vs Windows SDK

查看:99
本文介绍了Visual Studio 平台工具集与 Windows SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么 Microsoft Visual Studio 对同一项目中的Windows SDK"和平台工具集"设置具有不同的配置属性?我知道每个 Windows SDK 都提供新的/不同版本的平台工具集.那么在同一项目中指定 Windows 10 SDK 的平台工具集并同时将 SDK 选项设置为 Windows 8.1 SDK 有什么意义?

非常混乱.

解决方案

根据

Why does Microsoft visual studio has different configuration properties for settings 'Windows SDK' and 'platform toolset' in same project? I have the understanding that every windows SDK provides new/different version of platform toolset. So how does it make sense to specify platform toolset of say Windows 10 SDK and at the same time setting the SDK option to say Windows 8.1 SDK in the same project?

Very confusing.

解决方案

Accoding to the Doc

For the Windows target platform, Windows SDK Version specifies the version of the Windows SDK that your project requires.

Platform Toolsetallows the project to target a different version of the Visual C++ libraries and compiler. Visual Studio C++ projects can target either the default toolset installed by Visual Studio, or one of the toolsets installed by several previous versions of Visual Studio, including toolsets that create executables that can run on Windows XP.

"I have the understanding that every windows SDK provides new/different version of platform toolset"

The platform toolset consists of the C++ compiler (cl.exe) and linker (link.exe), along with the C/C++ standard libraries. Platform Toolset is related to visual studio version. For example :

Visual Studio 2015: v140

Visual Studio 2017: v141

Visual Studio 2019: v142

Windows SDK is related to windows version. For example:

Windows SDK(10.0.18362.0):Windows 10, version 1903

Windows SDK(8.1): Windows 7 or Windows Vista

这篇关于Visual Studio 平台工具集与 Windows SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆