cmake 采用toolchain.cmake 文件进行arm-linux跨平台编译

本文详细解析了如何在优快云上发布一篇高质量的技术博客,包括标题、标签和内容的优化策略,旨在帮助作者提高文章的可见性和吸引力。
book@100ask:~/openwrt/mqtt/paho.mqtt.c-1.3.8/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/arm-linux-setup.cmake .. -- The C compiler identification is unknown -- Check for working C compiler: /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/ -- Check for working C compiler: /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/ -- broken CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler "/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/book/openwrt/mqtt/paho.mqtt.c-1.3.8/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_071d0/fast" /usr/bin/make -f CMakeFiles/cmTC_071d0.dir/build.make CMakeFiles/cmTC_071d0.dir/build make[1]: Entering directory '/home/book/openwrt/mqtt/paho.mqtt.c-1.3.8/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_071d0.dir/testCCompiler.c.o /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/ arm-poky-linux-gnueabi-gcc -o CMakeFiles/cmTC_071d0.dir/testCCompiler.c.o -c /home/book/openwrt/mqtt/paho.mqtt.c-1.3.8/build/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: execvp: /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/: Permission denied CMakeFiles/cmTC_071d0.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_071d0.dir/testCCompiler.c.o' failed make[1]: *** [CMakeFiles/cmTC_071d0.dir/testCCompiler.c.o] Error 127 make[1]: Leaving directory '/home/book/openwrt/mqtt/paho.mqtt.c-1.3.8/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_071d0/fast' failed make: *** [cmTC_071d0/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:21 (PROJECT) -- Configuring incomplete, errors occurred! See also "/home/book/openwrt/mqtt/paho.mqtt.c-1.3.8/build/CMakeFiles/CMakeOutput.log". See also "/home/book/openwrt/mqtt/paho.mqtt.c-1.3.8/build/CMakeFiles/CMakeError.log". 这个报错分析一下
最新发布
10-30
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值