paho-mqtt-c交叉编译

2021/9/10 23:07:24

本文主要是介绍paho-mqtt-c交叉编译,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1. 在目录paho-mqtt-c/cmake中新建文件toolchain.linux-arm11-hdaq.cmake

# path to compiler and utilities
# specify the cross compiler
SET(CMAKE_C_COMPILER aarch64-himix200-linux-gcc)

# Name of the target platform
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_PROCESSOR arm)

# Version of the system
SET(CMAKE_SYSTEM_VERSION 1)

2. 在paho-mqtt-c目录下新建build_arm目录并进入此目录,执行命令:

cmake .. -DPAHO_BUILD_STATIC=TRUE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain.linux-arm11-hdaq.cmake



这篇关于paho-mqtt-c交叉编译的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程