I am trying to get ZeroMQ work on Windows 10 but with no success. I have compiled the dependent libraries using cmake and Visual Studio and it was successfully built.
However I ran into error when trying the example problem and realized there is a linking error, system is unable to locate the header files stored.
I had asked previously about this issue here which partially solved but I still got error, I get error #include <czmq.h> missing when running program
So I tried manually providing the path to gcc and got some wierd error- Here is example code which I used
#include <czmq.h>
int main (void) {
zsock_t *publisher = zsock_new (ZMQ_PUB);
zsock_set_curve_server (publisher, true);
puts ("Hello, Curve!");
zsock_destroy(&publisher);
return 0;
}
I compiled the above code using below method-
gcc hello.c -o myapp -lczmq -lzmq -I "C:\Users\P\go\src\github.com\zeromq\czmq\include" -L "C:\Users\P\go\src\github.com\zeromq\czmq\Debug"
As earlier I was getting as missing error and here is the output.
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\P\go\src\github.com\zeromq\czmq\Debug/czmq.lib when searching for -lczmq
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\P\go\src\github.com\zeromq\czmq\Debug/libczmq.dll when searching for -lczmq
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\P\go\src\github.com\zeromq\czmq\Debug/czmq.lib when searching for -lczmq
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\P\go\src\github.com\zeromq\czmq\Debug/libczmq.dll when searching for -lczmq
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Users\P\go\src\github.com\zeromq\czmq\Debug\czmq.lib when searching for -lczmq
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lczmq
collect2.exe: error: ld returned 1 exit status
So I am stuck with such simple things which aren't working :( Any suggestion will really be helpful.