找回密码
 立即注册
查看: 160|回复: 0

zmq protobuf 通信

[复制链接]
发表于 2023-3-9 11:24 | 显示全部楼层 |阅读模式
apt直接安装

# zmq protobuf 环境安装apt-get updateapt-get upgradeapt-get install vim g++ cmake libprotobuf-dev protobuf-compiler libzmq3-dev -y源码编译

# protobuf源码编译cd protobuf-3.20.2/mkdir build-makecd build-makesudo cmake ./../cmake/sudo make install# 提示 include lib bin的位置, 取出来放到一起# libzmq源码编译mkdir buildcd buildcmake ..make -j8make installCMakeLists使用


源码编译与 sudo apt install libprotobuf-dev 使用方法有所不同
# CmakeLists.txt# liblink_directories(  /usr/local/lib #add protobuf)# targettarget_link_libraries(${PROJECT_NAME}_node  protobuf  -lpthread)
而apt安装的需要这样
# CmakeLists.txt# targettarget_link_libraries(${PROJECT_NAME}_node  -lprotobuf  -lpthread)
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-31 10:30 , Processed in 0.088040 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表