赞
踩
1、官网地址 https://github.com/eclipse/paho.mqtt.cpp 2、编译 $ sudo apt-get install build-essential gcc make cmake cmake-gui cmake-curses-gui $ sudo apt-get install libssl-dev $ sudo apt-get install doxygen graphviz $ git clone https://github.com/eclipse/paho.mqtt.cpp $ cd paho.mqtt.cpp $ cmake -Bbuild -H. -DPAHO_BUILD_STATIC=ON \ -DPAHO_BUILD_DOCUMENTATION=TRUE -DPAHO_BUILD_SAMPLES=TRUE $ sudo cmake --build build/ --target install $ sudo ldconfig
# 设置环境变量依赖库路径 export CMAKE_LIBRARY_PATH=/root/test-2023-05-08/terminal_bak/lib_new:$CMAKE_LIBRARY_PATH vi CMakeLists.txt # 添加以下内容 set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR aarch64) set(tools /root/t507/sdk_v2/V2.0/out/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu) set(CMAKE_C_COMPILER ${tools}/bin/aarch64-linux-gnu-gcc) set(CMAKE_CXX_COMPILER ${tools}/bin/aarch64-linux-gnu-g++) set(ROOT_DIR /root/test-2023-05-08/terminal_bak/lib_new) mkdir build cd build cmake .. make make install
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。