I have built https://github.com/zeromq/libzmq/releases/tag/v4.3.4 as following:
./autogen.sh
./configure --prefix=`pwd`/install --enable-drafts
make install
Besides, I use https://github.com/zeromq/cppzmq/releases/tag/v4.8.1 and the codes as followings:
// .hpp
...
zmq::context_t zmq_context_;
...
std::shared_ptr<zmq::socket_t> zmq_camera_;
...
// .cpp
// camera socket
zmq_camera_ = std::make_shared<zmq::socket_t>(zmq_context_, ZMQ_RADIO);
...
const std::string &camera_publish_address =
"udp://*:" +
std::to_string(camera_config.cameras[0].publish_port);
std::cout << "Camera publish at " << camera_publish_address << std::endl;
zmq_camera_->bind(camera_publish_address);
...
However, it runs with crash:
...
Camera publish at udp://*:6600
terminate called after throwing an instance of 'zmq::error_t'
what(): The protocol is not compatible with the socket type
...