2011-10-28 90 views
0
The C compiler identification is GNU 
The CXX compiler identification is GNU 
Check for working C compiler: C:/WinAVR-20100110/bin/avr-gcc.exe 
Check for working C compiler: C:/WinAVR-20100110/bin/avr-gcc.exe -- broken 
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): 
    The C compiler "C:/WinAVR-20100110/bin/avr-gcc.exe" is not able to compile 
    a simple test program. 

它失敗,出現以下的輸出:CMake的錯誤與AVR WINAVR編譯

Change Dir: F:/projects/UniRobot/code/navigation/build/CMakeFiles/CMakeTmp 



    Run Build Command:C:/PROGRA~1/CMAKE2~1.8/bin/cmake.exe 
    "cmTryCompileExec/fast" 

    CMake Error: The source directory 
    "F:/projects/UniRobot/code/navigation/build/CMakeFiles/CMakeTmp/cmTryCompileExec/fast" 
    does not exist. 

    Specify --help for usage, or press the help button on the CMake GUI. 

    CMake will not be able to correctly generate this project. 
Call Stack (most recent call first): 
    CMakeLists.txt:11 (PROJECT) 

所以,一切都是Linux和Win 7的下好了,但在XP SP2,SP3我有這個錯誤。這意味着我的控制器AVR編譯器不正確,CMake無法使用WINAVR編譯器提供測試程序。第一次運行這個錯誤也是在Win7下,但第二次運行後它消失了。我在windows reg中寫道。我重寫了編譯器的路徑,sh和cmake。但是錯誤仍然存​​在。

+0

你能否提供CMakeFiles/CMakeError.log?也認爲下面的鏈接可以幫助分析您的問題http://cygwin.com/ml/cygwin/2008-06/msg00026.html –

+0

確定C編譯器是否工作失敗,並顯示以下輸出: 更改目錄:F:/項目/ UniRobot /代碼/導航/編譯/ CMakeFiles/CMakeTmp 運行構建命令:C:/PROGRA~1/CMAKE2~1.8/bin/cmake.exe 「cmTryCompileExec /快」 CMake的錯誤:源目錄「F:/projects/UniRobot/code/navigation/build/CMakeFiles/CMakeTmp/cmTryCompileExec/fast「不存在。 指定 - 幫助使用,或按CMake GUI上的幫助按鈕。 – user1018139

+0

要在主機系統上使用交叉編譯器,需要定義工具鏈文件並按照http://www.vtk.org/Wiki/CMake_Cross_Compiling提供給cmake。例如「cmake -DCMAKE_TOOLCHAIN_FILE = <工具鏈-eldk-ppc8xx.cmake的路徑> .. –

回答

0

Compiller C和C++已經寫在CMake交叉編譯文件中。我如何做到這一點,你可以在這裏看到http://robot-develop.org/archives/2952

在另一臺機器與Win Vista和7一切都OK。

我試着從WINAVR目錄手動選擇C | C++編譯器文件A​​VR-GCC和AVR-G ++,但仍然發生錯誤。