kirin77 发表于 2023-3-9 11:24

zmq protobuf 通信

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}_nodeprotobuf-lpthread)
而apt安装的需要这样
# CmakeLists.txt# targettarget_link_libraries(${PROJECT_NAME}_node-lprotobuf-lpthread)
页: [1]
查看完整版本: zmq protobuf 通信