[zeromq-dev] Static link
Ivan Pechorin
ivan.pechorin at gmail.com
Thu Jun 14 18:52:29 CEST 2012
Hi Xavier
I would like to do a dll for windows 32 (for my project), and doing a
> static link with libzmq.lib.
>
> I compile the solution zeromq-3.2.0 with:****
>
> ** **
>
>
>
> I try this, directly in the zmq.h:****
>
> __declspec(dllexport) int zmq_bind (void *s, const char *addr);****
>
> ** **
>
> And in my project ****
>
> __declspec(dllimport) int zmq_bind (void *s, const char *addr);****
>
> ** **
>
> But I have the same error. ****
>
>
>
__declspec(dllexport) and __declspec(dllimport) are for dynamic linkage,
not static.
Did you follow the instruction that you just referenced? I.e., 1) change
zmq.h to add ZMQ_STATIC and 2) define ZMQ_STATIC both when compiling zeromq
and when compiling your application.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120614/13d64ad4/attachment.htm>
More information about the zeromq-dev
mailing list