2014-06-06 30 views
1

我在Windows上設置了Clang和CMake,並在OpenSceneGraph項目源(配置步驟)上運行cmake-gui時,該進程失敗,出現Check for working C compiler: C:/Program Files (x86)/LLVM/bin/clang.exe -- brokenWindows上的Clang和CMake - clang.exe損壞,程序無法執行

繼全輸出:

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". 

什麼可以這樣做的原因?程序之間是否存在不兼容性,或者是否存在環境變量?

回答

0

您的叮噹聲安裝被破壞/未完成,或者它可能是cmake bug。首先檢查你可以編譯的「Hello World」直接與鐺(無CMake的)

0

你需要確保以正確的工具集使用Visual Studio發電機鐺

http://public.kitware.com/Bug/view.php?id=14863

我不知道cmake-gui是否有設置工具集的方法,所以請嘗試在命令行上。

cmake.exe .. -T LLVM-vs2010 
+0

我沒有安裝Visual Studio工具集,我也不打算這樣做。沒有一種方法可以讓它在沒有另一個工具鏈的情況下工作?我使用的生成器是'Eclipse CTD - Unix Makefiles'(帶有GnuWin32-make)或'Eclipse CTD - Ninja Makefiles'。 – Appleshell

+0

我只能建議上游的bug。 – steveire