NB开发二:商业代码开发环境
商业代码环境
ubuntu 20.04
1、gcc g++ cmake git
apt update
apt install gcc g++ cmake git build-essential make
2、MQTT Server
sudo apt install mosquitto mosquitto-clients //配置Mosquitto(可选): 你可以编辑配置文件/etc/mosquitto/mosquitto.conf来配置Mosquitto。
sudo systemctl start mosquitto //启动Mosquitto服务:
sudo systemctl enable mosquitto //设置Mosquitto服务开机自启(可选):
sudo systemctl status mosquitto //检查Mosquitto服务状态:
3、MQTT Client三方库:paho-mqtt
sudo apt-get install libssl-dev //安装依赖
git clone https://github.com/eclipse/paho.mqtt.cpp.git
cd paho.mqtt.cpp
git branch -a
git checkout v1.4.x
git branch -a
git submodule init
git submodule update //自动下载MQTT C库
cmake -Bbuild -H. -DPAHO_BUILD_EXAMPLES=ON //出现错误看SSL
root@yg:/home/yg/downloads/paho.mqtt.cpp# cmake -Bbuild -H. -D

最低0.47元/天 解锁文章
1404

被折叠的 条评论
为什么被折叠?



