使用scons构建时无法打开包含文件错误

时间:2018-10-11 07:40:03

标签: c++ visual-studio-2017 scons

几天前,我在github上下载了mitsuba_shapenet渲染器,并尝试使用scons编译源代码。但是有一些问题。 一开始,我收到一条消息:“ cl”未被识别为内部或外部命令。然后,我设置环境变量,并且错误消息已更改:

file F:\DataSets\MERL 100 Material Library\examples\mitsuba_shapenet\mitsuba_shapenet\build\SConscript.configure,line 137:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for cl ...
.sconf_temp\conftest_0.cpp <-
  |#include <sstream>
  | int main(int argc, char **argv) {
  | std::ostringstream oss;
  | return 0;
  | }
cl /Fo.sconf_temp\conftest_0.obj /c .sconf_temp\conftest_0.cpp /nologo /Oi /Ot /Oy /Ob1 /Gs /GF /Gy /fp:fast /D WIN32 /D WIN64 /W3 /EHsc /GS- /GL /MD /D MTS_DEBUG /D SINGLE_PRECISION /D SPECTRUM_SAMPLES=3 /D MTS_SSE /D MTS_HAS_COHERENT_RT /D _CONSOLE /D NDEBUG /D OPENEXR_DLL /openmp /nologo /D GLEW_MX /Idependencies\include\openexr /Idependencies\include\openexr /Iinclude /Idependencies\include
conftest_0.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include\crtdefs.h(10): fatal error C1083: Cannot open include file: “corecrt.h”: No such file or directory
scons: Configure: no

然后我在计算机上搜索corecrt.h并在这里找到了

C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt

然后我尝试在Visual Studio 2017中添加include和libs的路径,但仍然无法正常工作。我正在使用Windows 10 64位。

我担心这个问题,如何成功构建此源代码?

0 个答案:

没有答案