【发布时间】:2019-10-31 04:29:36
【问题描述】:
我一直在关注 learnopengl.com,我在网站的转换部分,它一直在说
CL.exe" 以代码 2 退出
这使得无法测试任何东西,因为它不会构建。
我尝试了很多东西,我尝试复制教程中的所有代码,然后尝试运行它,但它仍然给出相同的错误。我已经尝试重新启动 Visual Studio,以防出现智能感知错误但仍然没有成功。
它说导致问题的代码是第 429 行的 Microsoft.CppCommon.targets 的一部分,它没有提供更多信息 但这是给出错误的行
<CL Condition="'%(ClCompile.PrecompiledHeader)' != 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true' and '%(ClCompile.CompilerIteration)' == '' and @(ClCompile) != ''"
这是它下面的一些代码
BuildingInIDE ="$(BuildingInsideVisualStudio)"
Sources ="@(ClCompile)"
但它没有告诉我是什么导致了错误,所以我不知道问题是什么。
它应该完全可以编译和运行,但它会一遍又一遍地给出同样的错误。
【问题讨论】:
-
似乎是工具链配置错误/安装错误
标签: c++ visual-studio opengl visual-studio-2019 cl.exe