【发布时间】:2011-10-28 10:43:06
【问题描述】:
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 的路径。但是错误仍然存在。
【问题讨论】:
-
能否请您提供 CMakeFiles/CMakeError.log ?我也认为以下链接可以帮助分析您的问题cygwin.com/ml/cygwin/2008-06/msg00026.html
-
确定 C 编译器是否工作失败,输出如下: 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 错误:源目录 "F:/projects/UniRobot/code/navigation/build/CMakeFiles/CMakeTmp/cmTryCompileExec/fast" 不存在。指定 --help 使用,或按 CMake GUI 上的帮助按钮。
-
要在主机系统上使用交叉编译器,需要定义工具链文件并按照vtk.org/Wiki/CMake_Cross_Compiling将其提供给cmake。例如“cmake -DCMAKE_TOOLCHAIN_FILE=
..
标签: windows cmake avr avr-gcc winavr