[zeromq-dev] List Guidelines and Project/Source modifications - Windows/MSVC
Martin Lucina
martin at lucina.net
Mon Jan 23 02:30:10 CET 2012
skaller at users.sourceforge.net said:
>
> On 22/01/2012, at 12:13 PM, Martin Sustrik wrote:
>
> > On 19/01/12 17:05, john skaller wrote:
> >
> >> This is seriously bugged. You may not use the name DLL_EXPORT.
> >> You must use a command line macro name specific to the library!
> >> For example ZMQ_DLL_EXPORT.
> >
> > You mean that if zmq.h is included in a header file of another library that happens to define DLL_EXPORT, zmq functions would be exported from that library as well, which is not desirable for everyone. Right?
> >
>
> Yes, precisely. You need to use a name unique to your own library.
> The convention in MS land is something like
>
> BUILD_ZMQ
>
> but it doesn't matter as long as you have ZMQ in it :)
DLL_EXPORT is probably my fault, I vaguely remember implementing the
ZMQ_EXPORT stuff a long time ago. I *think* there was some reason why
DLL_EXPORT got used instead of a ZMQ_ namespaced identifier.
Anyhow, I don't really use Windows so I suggest that the users that care
about this make it work and submit a patch, just be aware that any changes
need to be tested to ensure all the other build platforms aren't broken.
Oh, and while you're at it, the topic of being able to build a static lib
on Windows comes up fairly regularly, so you might want to make ZMQ_STATIC
work as well :-)
-mato
More information about the zeromq-dev
mailing list