【发布时间】:2014-06-06 04:38:06
【问题描述】:
我已经在 Windows 上设置了 Clang 和 CMake,当在 OpenSceneGraph 项目源(配置步骤)上运行 cmake-gui 时,该过程失败并显示 Check for working C compiler: C:/Program Files (x86)/LLVM/bin/clang.exe -- broken。
跟随整个输出:
The C compiler identification is unknown
The CXX compiler identification is unknown
Found Eclipse version 4.3 ()
Check for working C compiler: C:/Program Files (x86)/LLVM/bin/clang.exe
Check for working C compiler: C:/Program Files (x86)/LLVM/bin/clang.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/LLVM/bin/clang.exe" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeTmp
Run Build Command:C:/PROGRA~2/GnuWin32/bin/make.exe
"cmTryCompileExec2091697540/fast"
C:/PROGRA~2/GnuWin32/bin/make.exe -f
CMakeFiles/cmTryCompileExec2091697540.dir/build.make
CMakeFiles/cmTryCompileExec2091697540.dir/build
make.exe[1]: Entering directory
`C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeTmp'
"C:/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeTmp/CMakeFiles
1
"Building C object
CMakeFiles/cmTryCompileExec2091697540.dir/testCCompiler.c.obj"
"C:/Program Files (x86)/LLVM/bin/clang.exe" -o
CMakeFiles/cmTryCompileExec2091697540.dir/testCCompiler.c.obj -c
C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeTmp/testCCompiler.c
clang.exe: error: unable to execute command: program not executable
clang.exe: error: assembler (via gcc) command failed with exit code 1 (use
-v to see invocation)
make.exe[1]: ***
[CMakeFiles/cmTryCompileExec2091697540.dir/testCCompiler.c.obj] Fehler 1
make.exe[1]: Leaving directory
`C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeTmp'
make.exe: *** [cmTryCompileExec2091697540/fast] Fehler 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:47 (PROJECT)
Configuring incomplete, errors occurred!
See also "C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Adam/Desktop/OpenSceneGraph-3.2.1-rc3/build/CMakeFiles/CMakeError.log".
这可能是什么原因?是程序之间不兼容,还是缺少环境变量?
【问题讨论】: