如何为 VS2017 自定义 Microsoft.Cpp.Win32.User.props
How to customise Microsoft.Cpp.Win32.User.props for VS2017?
传统上,我们已经能够设置Microsoft.Cpp.Win32.User.props文件,以帮助我们使用PlatformToolset为不同版本的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.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
<PropertyGroup Condition="$(PlatformToolset) == 'v100'">
<IncludePath>C:SDKsboost_1_53_0;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="$(PlatformToolset) == 'v120'">
<IncludePath>C:SDKsboost_1_59_0;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="$(PlatformToolset) == 'v140'">
<IncludePath>C:SDKsboost_1_64_0;$(IncludePath)</IncludePath>
</PropertyGroup>
但是我不知道如何为Visual Studio 2017做到这一点。什么版本的PlatformToolset是正在使用,还是完全放弃了它?
刚刚在我的 .vcxprof 文件中找到了这个:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
使用 PlatformToolset = v141 工作正常。
相关文章:
- .cpp和.h文件中的模板专用化声明
- 为什么两个不同的未命名名称空间可以共存于一个cpp文件中
- Linux的Cpp上的计时器
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- 命名空间中具有.h和.cpp文件的类
- 内置函数可查看CPP中的成员变量
- Win32编译器选项和内存分配
- 无法编译 rtmidi 测试 cmidiin.cpp 文件, 非法指令
- Cpp-Tuple使用带有变量的get
- C++-试图将函数指针推回到另一个CPP文件中的矢量时出错
- 有充分的理由在h文件中使用include保护而不是cpp文件吗
- 如何通过cpp程序运行shell脚本
- 使用2个键的cpp-stl::优先级队列排序不正确
- cpp二进制搜索问题,计算给定数组中输入元素的出现次数
- 如何在cpp文件之间切换窗口?在Qt中
- 在 .h 文件中的类中声明静态变量和在.cpp文件中声明"global"变量有什么区别
- 如何为 VS2017 自定义 Microsoft.Cpp.Win32.User.props
- 编译 PythonService.cpp来自 win32 Python 扩展构建
- CPP Win32移动鼠标,Wont移动到我指定的位置
- c++ Win32如何将此函数放在单独的cpp文件上