[zeromq-dev] How to make it easier to compile static lib under windows? (DLL_EXPORT in zmq.h)

Martin Sustrik sustrik at 250bpm.com
Fri Jun 10 16:50:32 CEST 2011

Hi Seref,

> The DSO symbol visibility part in zmq.h has two options, DLL_EXPORT is
> defined or not. The problem is, this allows the header to be used in
> only two configurations: if you're building a dll, or if you're using
> a dll under windows.
> If you're exporting a static lib, you need to manually modify this
> section so that DLL_EXPORT is defined as empty string when compiling
> the static lib, and then you need to modify the header again, when
> you're linking to static lib.
> Any chance for introducing a third combination here so that the static
> library compilation is also supported? I wonder if there is a symbol
> for static library, that corresponds to DLL_EXPORT for dlls? If there
> is one, simply adding that would allow for a header file which would
> support static lib compilation and linking without any modifications
> (hopefully)

Have a look at the mailing list archives. There have been couple of 
discussions wrt. building of static libs on Windows.


More information about the zeromq-dev mailing list