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

Seref Arikan serefarikan at kurumsalteknoloji.com
Mon Jun 6 12:12:39 CEST 2011


Hi,
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)

Cheers
Seref



More information about the zeromq-dev mailing list