cmake 提示gcc或交叉编译 broken
2016-05-05 19:58
507 查看
cmake
reports gcc is broken. Where do I start?
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/usr/bin/gcc" is not able to compile a simple test program.
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION
if this is wrong.
-- Check for working C compiler: /usr/bin/gcc-4.6
-- Check for working C compiler: /usr/bin/gcc-4.6 -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/usr/bin/gcc-4.6" is not able to compile a
simple testprogram.
解决
check this Link. i had the
same problem. i think the problem is that you need more parameters to compile (like linker-script, flags ...). change your CMakeLists like this and try it again:
do not forget to set the path to the compiler in your enviroment vars.
参考 http://stackoverflow.com/questions/16594053/cmake-reports-gcc-is-broken-where-do-i-start
reports gcc is broken. Where do I start?
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/usr/bin/gcc" is not able to compile a simple test program.
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION
if this is wrong.
-- Check for working C compiler: /usr/bin/gcc-4.6
-- Check for working C compiler: /usr/bin/gcc-4.6 -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/usr/bin/gcc-4.6" is not able to compile a
simple testprogram.
解决
check this Link. i had the
same problem. i think the problem is that you need more parameters to compile (like linker-script, flags ...). change your CMakeLists like this and try it again:
INCLUDE(CMakeForceCompiler) CMAKE_FORCE_C_COMPILER(gcc GNU) CMAKE_FORCE_CXX_COMPILER(g++ GNU)
do not forget to set the path to the compiler in your enviroment vars.
参考 http://stackoverflow.com/questions/16594053/cmake-reports-gcc-is-broken-where-do-i-start
相关文章推荐
- 9508v进入工程模式
- 如果有人问你数据库的原理,叫他看这篇文章
- KL25利用低功耗定时器进行MCU低功耗唤醒
- cf 666A
- 老板,来碗毒鸡汤!
- NYIST 714 异 形 卵(第六届河南省程序设计大赛)
- hashtable笔记 c++
- 归并排序
- MapReduce程序开发
- 【U3D】进入shader编程的世界
- leetcode(1),reverse(python)
- 九度OJ--Q1165
- 桶排序
- [设计模式]23种设计模式
- Windows编程中如何解决字符不匹配问题
- ASP.NET MVC 多语言解决方案
- iOS开发中如何管理多个版本的Cocoapods、gem
- 计算机视觉--图像导数-图像梯度向量
- 关于Cocoapods安装的小细节错误
- 数组型队列(queue)的使用(支持自定义数据类型)(C++版)