提示信息:error MSB8020: The build tools for v141 (Platform Toolset = ‘v141’) cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting “Retarget solution”.
根据报错信息很清楚地看到就是构建工具的平台版本不匹配,即我拿的是别人在VS2017的工程,但是我本地是VS2015的工程,这两个工程配置差异导致的构建失败。
打开VS2015项目-项目-属性-常规-平台工具集,修改成你本地对应的就可以,以VS2015为例,应该是VS2015(v140),截图如下:

修改完成后还出现另一个报错:error MSB8036: The Windows SDK version 10.0.17763.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting “Retarget solution”.
与上面分析一致,也是平台不匹配导致。

编译成功,正常生成lib文件:
