我正在尝试使Go ZMQ4绑定(bind)在Windows上工作。
不幸的是,我既无法构建zmq库,也无法构建Gozmq软件,并出现以下错误:
*** Since this library must not contain undefined symbols,
*,因为平台不支持它们或
,使用-no-undefined明确请求,
libtool将仅创建它的静态版本。
make [2]:离开目录
/e/Users/mmarques/Desktop/zeromq-4.0.5/src'make[1]: Leaving directory
/e/Users/mmarques/Desktop/zeromq-4.0.5/src'在文档中全部制作
make [1]:输入目录
/e/Users/mmarques/Desktop/zeromq-4.0.5/doc'make[1]: Nothing to be done for
all'。make [1]:离开目录
/e/Users/mmarques/Desktop/zeromq-4.0.5/doc'Making all in perfmake[1]: Entering directory
/e/Users/mmarques/Desktop/zeromq-4.0.5/perf'CXX local_lat.o
CXXLD local_lat.exe
local_lat.o:在函数
main':e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:45: undefined reference to
__imp_zmq_init'中e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:51:未定义参照
e到
__imp_zmq_socket'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:57: undefined reference to
__imp_zmq_bind'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:63:未定义参照
e到
__imp_zmq_msg_init'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:69: undefined reference to
__imp_zmq_recvmsg'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:75:未定义参照
e到
__imp_zmq_msg_size'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:79: undefined reference to
__imp_zmq_sendmsg'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:72:未定义参照
e到
__imp_zmq_strerror'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:86: undefined reference to
__imp_zmq_msg_close'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:92:未定义参照
e到
__imp_zmq_sleep'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:94: undefined reference to
__imp_zmq_close'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:100:未定义参照
ce to
__imp_zmq_term'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:102: undefined reference to
__imp_zmq_strerror'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:81:未定义参照
e到
__imp_zmq_strerror'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:59: undefined reference to
__imp_zmq_strerror'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:65:未定义参照
e到
__imp_zmq_strerror'e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:96: undefined reference to
__imp_zmq_strerror'local_lat.o:e:\Users\mmarques\Desktop\zeromq-4.0.5\perf/local_lat.cpp:88:更多u
未定义对
__imp_zmq_strerror' followcollect2.exe: error: ld returned 1 exit statusmake[1]: *** [local_lat.exe] Error 1make[1]: Leaving directory
/e/Users/mmarques/Desktop/zeromq-4.0.5/perf'的引用make:* [所有递归]错误1
我所做的是下载Zmq Sources并执行
谁能帮助我找出解决方法,并在Windows环境中设置Zmq Go绑定(bind)?
最佳答案
确保您已安装MinGW gcc工具链。 Go需要它能够从zmq4正在执行的Go代码中调用C代码。如果 checkout zmq4存储库,则可以看到.h头文件。请参阅:https://golang.org/doc/install和https://golang.org/cmd/cgo/。
关于go - ZeroMq Golang绑定(bind)无法在Windows上构建,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29824285/