我正在尝试从源代码构建 OpenCascade。我正在使用本指南: https ://github.com/tpaviot/oce/blob/master/BUILD.MINGWw64.md
1-5 的所有步骤,包括下载内容都已执行。现在我正在尝试使用 CMAKE 构建
*我使用“源代码在哪里”选项指向 oce 的目录(按照说明)。*我使用“在哪里构建二进制文件”选项,将我命名为“BUILD”的文件夹指向上述步骤中提到的目录内(按照说明)。*我按下“配置”并使用默认的本机编译器选择“MSYS Makefiles”。
这里开始了错误。我注意到 CMake 生成了一个文本文件,所以我进入并更改了 CMAKE MAKE 位置:CMAKE_MAKE_PROGRAM:FILEPATH=C:/Users/User1/Desktop/OPENCA~1/msys/bin
我继续前进,但产生了新的错误。
那么我该如何前进呢?
然后指南说:“检查 OCE_USE_BUNDLE_SOURCE 检查 OCE_WITH_FREEIMAGE 检查 OCE_WITH_GL2PS 检查 OCE_VISUALISATION”
我在哪里设置这些?文本文件中没有这样的变量,我也不能在 CMAKE 上设置它们。
编辑:这些是我现在得到的错误:
The C compiler identification is GNU 8.1.0
The CXX compiler identification is GNU 8.1.0
Detecting C compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_a5bfb/fast &&
Detecting C compiler ABI info - failed
Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_d3ad7/fast &&
Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/User1/Desktop/OpenCascade project/oce/BUILD/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_d3ad7/fast && Access is denied
Generator: execution of make failed. Make command was: C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_d3ad7/fast &&
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:20 (project)
Configuring incomplete, errors occurred!
See also "C:/Users/User1/Desktop/OpenCascade project/oce/BUILD/CMakeFiles/CMakeOutput.log".
See also "C:/Users/User1/Desktop/OpenCascade project/oce/BUILD/CMakeFiles/CMakeError.log".
编辑 2:CMake 中有一些空选项:
编辑 3:在听从 Tsyvarev 的建议后,我将线路改为
CMAKE_MAKE_PROGRAM:FILEPATH=C:/Users/User1/Desktop/OPENCA~1/msys/bin/make.exe
这些是我得到的错误:
The C compiler identification is GNU 8.1.0
The CXX compiler identification is GNU 8.1.0
Detecting C compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_51dc6/fast &&
Detecting C compiler ABI info - failed
Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_88ba8/fast &&
Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/User1/Desktop/OpenCascade project/oce/BUILD/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_88ba8/fast && Access is denied
Generator: execution of make failed. Make command was: C:/Users/User1/Desktop/OPENCA~1/msys/bin cmTC_88ba8/fast &&
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:20 (project)
Configuring incomplete, errors occurred!
See also "C:/Users/User1/Desktop/OpenCascade project/oce/BUILD/CMakeFiles/CMakeOutput.log".
See also "C:/Users/User1/Desktop/OpenCascade project/oce/BUILD/CMakeFiles/CMakeError.log".