C++ 如何为VS2017定制Microsoft.Cpp.Win32.User.props?
传统上,我们可以通过使用PlatformToolset设置Microsoft.Cpp.Win32.User.props文件,以帮助我们对不同版本的Visual Studio进行不同的设置: Visual Studio 2012=v100 Visual Studio 2013=v120 Visual Studio 2015=v140C++ 如何为VS2017定制Microsoft.Cpp.Win32.User.props?,c++,visual-studio-2017,C++,Visual Studio 2017,传统上,我们可以通过使用PlatformToolset设置Microsoft.Cpp.Win32.User.props文件,以帮助我们对不同版本的Visual Studio进行不同的设置: Visual Studio 2012=v100 Visual Studio 2013=v120 Visual Studio 2015=v140 <?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.micr
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
<PropertyGroup Condition="$(PlatformToolset) == 'v100'">
<IncludePath>C:\SDKs\boost_1_53_0;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="$(PlatformToolset) == 'v120'">
<IncludePath>C:\SDKs\boost_1_59_0;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="$(PlatformToolset) == 'v140'">
<IncludePath>C:\SDKs\boost_1_64_0;$(IncludePath)</IncludePath>
</PropertyGroup>
C:\SDKs\boost\u 1\u 53\u 0$(包括路径)
C:\SDKs\boost\u 1\u 59\u 0$(包括路径)
C:\SDKs\boost\u 1\u 64\u 0$(包括路径)
但我不知道如何为Visual Studio 2017做到这一点。什么版本的
PlatformToolset正在使用,还是完全放弃了它?刚刚在我的.vcxprof文件中找到了这个:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
静态库
v141
使用PlatformToolset=v141可以很好地工作。在项目中使用平台工具集设置时,可以在“常规”页面上看到它。名称显示在(括号中)。所以是v141。一定要小心,你的项目不会在另一台机器上构建,也不会在一两年后构建。从来都不是一个非常理想的项目:)