New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不能和ZeroMQ库同时使用 #322
Comments
这个可能是 winsock 版本冲突,先 include coost 头文件,使用 winsock2 应该能解决冲突。 第2个问题需要提供进一步的信息,使用 master 最新代码试试 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
测试环境:
平台:win10
ide:vs2022
ZeroMQ版本:4.3.4(当前最新版)
coost版本:v3.0.0/master
测试问题:
1、头文件必须如下顺序定义:
#include "co/all.h" #include "zmq.hpp"
如果颠倒位置则报错:
co\byte_order.h(37): error C3861: “htonll”: 找不到标识符
2、遵守第一点时通过编译,运行时会报错
测试代码:
`
#include
#include "co/all.h"
#include "zmq.hpp"
int main(int argc, char **argv) {
co::WaitGroup w{};
w.add(1);
go([&] {
std::string request{"hello"};
});
w.wait();
return 0;
}
`
报错如下:
The text was updated successfully, but these errors were encountered: