【问题标题】:Build VS 2015 project in VS 2019在 VS 2019 中构建 VS 2015 项目
【发布时间】:2021-06-03 15:46:53
【问题描述】:

我想在我的VS C++ 2019(Win 10) 中编译VS C++ 2015 项目。我已经安装了 v140 平台工具集,但是当我在 Configuration Properties->General 中将 Platform Toolset 设置为 Visual Studio 2015 (v140) 时,尝试构建我得到的解决方案:

1>cl : Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
1>WindowsProject2.cpp
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\windows.h(167): fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory

Target Platform Version 中,我有10.0.18362.0(唯一可供选择的)。

我还能做些什么来构建解决方案?

【问题讨论】:

    标签: c++ visual-studio sdk


    【解决方案1】:

    根据文档:Microsoft C++ porting and upgrading guide

    对于在 Visual Studio 2010 到 2017 中创建的项目,只需打开 Visual Studio 2019 中的项目。

    就我而言,您可以直接在 Visual Studio 2017 中打开 Visual Studio 2019 c++ 代码。

    致命错误 C1083:无法打开包含文件:'excpt.h'

    编译器在找不到文件时会生成 C1083 错误。我建议您可以先尝试找到该文件。

    我在这里看到了头文件:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\include

    然后您可以在项目属性中添加搜索包含文件的路径。

    【讨论】:

    • @Daros911 你有任何更新吗?如果您的案例已经解决,请帮忙标记答案。如果没有,请随时与我们联系。您的理解与合作将不胜感激。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-04
    • 2019-09-15
    • 1970-01-01
    相关资源
    最近更新 更多