04 vs2015打开vs2017工程

1. 修改平台:打开Project选择Properties选项,然后将Platform Toolset中的工具设定选择为VS2015(v140)。

04 vs2015打开vs2017工程

2. 重定SDK版本目标:

04 vs2015打开vs2017工程

04 vs2015打开vs2017工程

 

有时候会出现以下问题:

Severity    Code    Description    Project    File    Line    Suppression State
Error    C2338    va_start argument must not have reference type and must not be parenthesized    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\vadefs.h    151

出错代码在以下位置:

template <typename _Ty>
struct __vcrt_assert_va_start_is_not_reference
{
   static_assert(!__vcrt_va_list_is_reference<_Ty>::__the_value,
   "va_start argument must not have reference type and must not be parenthesized");
};

应该是强制关闭检查,可以通过以下做法,在项目的Preprocessor界面,加入_CRT_NO_VA_START_VALIDATION设置,如下,问题解决,旧项目成功编译执行。

04 vs2015打开vs2017工程