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.

它失败并显示以下输出:

   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 的路径。但是错误仍然存​​在。

4

1 回答 1

0

Compiller C 和 C++ 已经写在 CMake 交叉编译文件中。我是怎么做到的,你可以在这里看到http://robot-develop.org/archives/2952

在另一台装有 Win Vista 和 7 的机器上一切正常。

我尝试从 WINAVR 目录中手动选择 C|C++ 编译器文件 AVR-GCC 和 AVR-G++,但仍然出现错误。

于 2011-10-28T18:14:38.420 回答