[zeromq-dev] Almost successful with trunk, cmake and MinGW on Windows

Holger Hoffstätte holger at wizards.de
Tue Dec 9 18:45:42 CET 2008


Congratulations to the 0.4 release. I took this as opportunity to try to
build the latest trunk on, of all things, Windows with cmake and MinGW
(latest 4.3.2 edition from http://www.tdragon.net/recentgcc/). This latest
gcc supports all sorts of goodies (even OpenMP) and is a great alternative
to MSVCC for cross-platform development.

Much to my surprise the cmake process worked more or less out of the box -
very cool! I generated Windowsish-but-Unixy gnumakefiles by passing
-G"MinGW Makefiles" to cmake and that worked right away.
Since MinGW is still gcc, the build got a bit confused after that but
adjusting a few typedefs and defining the correct windows version in
platform.hpp did the trick; let me know if this is of interest and I'll
outline the steps in a JIRA.
The biggest and so far unsolved stumbling block was the use of a _TRUNCATE
macro/definition (?) which is apparently a MS CRT specific way of
protecting snprintf against buffer overruns (maybe related to ZMQ-128?). I
tried to fake it and that let the build proceed, giving me the libzmq.dll
and the zmq_server. Unfortunately it crashed immediately, but that might
well be due to the _TRUNCATE buffer handling. If someone sends me the
definition for _TRUNCATE I can try again.

Just thought this might be of interest. :)

Holger



More information about the zeromq-dev mailing list