交叉编译错误 is not able to compile a simple test program
Posted 晚餐男孩
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了交叉编译错误 is not able to compile a simple test program相关的知识,希望对你有一定的参考价值。
交叉编译出现错误:
CMake Error at /home/sph/.local/lib/python2.7/site-packages/cmake/data/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"/opt/cross-toolchain-9.2.0/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc"
is not able to compile a simple test program.
It fails with the following output:
解决办法:
强制的指定C和C++编译器,比如把CMAKE_C_COMPILER改成CMAKE_FORCE_C_COMPILER
INCLUDE(CMakeForceCompiler)
# this one is important
SET(CMAKE_SYSTEM_NAME eCos)
# specify the cross compiler
CMAKE_FORCE_C_COMPILER(arm-elf-gcc GNU)
CMAKE_FORCE_CXX_COMPILER(arm-elf-g++ GNU)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /home/alex/src/ecos/install )
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
以上是关于交叉编译错误 is not able to compile a simple test program的主要内容,如果未能解决你的问题,请参考以下文章
解决redis连接错误:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to...
VS2012生成ReactOS的VS工程失败和 “ cl is not able to compile a simple test program“错误
解决redis连接错误:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to...(示例
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Com
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d