Open sunfishgit opened 2 years ago
seems not link zmq library correctly. sepecify the zmq.a or zmq.so path use -L option.
We also tried it. -> Able to compile and link with mingw1120_64 from Qt. But in libzmq there is a problem: The compiler is treated as GNU, but Microsoft socket libs are used. The caused strange run time errors. We were able to solve it faking MSVC and taking out COM/MIDL stuff.
Hello, I am trying to compile a windows exe from linux using mingw however it results in an error. The issue seems to be related to the library not properly linking.
The build command:
i686-w64-mingw32-g++ ../src/client.cpp -o client -cpp=14 -static-libgcc -static-libstdc++ -lzmq
Error:
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/cc4yfeYE.o:client.cpp:(.text$_ZN3zmq7error_tC1Ev[__ZN3zmq7error_tC1Ev]+0x1e): undefined reference to `_imp__zmq_errno' /usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/cc4yfeYE.o:client.cpp:(.text$_ZNK3zmq7error_t4whatEv[__ZNK3zmq7error_t4whatEv]+0x13): undefined reference to `_imp__zmq_strerror' /usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/cc4yfeYE.o:client.cpp:(.text$_ZN3zmq9context_tC1Ev[__ZN3zmq9context_tC1Ev]+0xb): undefined reference to `_imp__zmq_ctx_new' /usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /tmp/cc4yfeYE.o:client.cpp:(.text$_ZN3zmq9context_t5closeEv[__ZN3zmq9context_t5closeEv]+0x1b): undefined reference to `_imp__zmq_ctx_term' collect2: error: ld returned 1 exit status
Any help is appreciated :)