我已尝试过官方howto,但失败了。我收到了错误:
"The procedure entry point InterlockedCompareExchange@12 could not be located in the dynamic link library libstdc++-6.dll"
答案 0 :(得分:3)
问题是由于旧的gcc
编译器与rubyinstaller.org的DevKit捆绑在一起(我的PC上为4.5 vs 4.8)。请改用MSYS。假设我们在D:\libs\zeromq
内有zeromq源,那么过程是:
C:\MinGW\msys\1.0\msys.bat
。mount c:/mingw /mingw
cd /d/libs/zeromq
./configure --prefix=/mingw
make
/d/libs/zeromq/src/.libs/libzmq.dll
复制到您想要的位置。实际上我需要将ZeroMQ与C ++一起使用,因此我下载了zmq.hpp
,将其移至include目录,并编译hwserver.cpp
进行测试:
C:\MinGW\bin\g++.exe -o hwserver hwserver.cpp -L. -lzmq -ID:\libs\zeromq\include
它有效,但是当我启动它时,我得到了:
Assertion failed!
Program: D:\tmp\zmq\hwserver.exe
File: D:\libs\zeromq\include/zmq.hpp, Line 280
Expression: rc == 0
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
我设法通过评论第279,280行来摆脱这种失败。Similar issue