[zeromq-dev] Using DRAFT methods of zeromq's build libraries

Arnaud Loonstra arnaud at sphaero.org
Tue Nov 3 11:25:19 CET 2020

On 02-11-2020 21:05, Luca Boccassi wrote:
> On Mon, 2 Nov 2020 at 19:23, Arnaud Loonstra <arnaud at sphaero.org> wrote:
>> Just a quick question. Would one need to define CZMQ_BUILD_DRAFT_API in
>> their own project in order to use the DRAFT methods?
>> For example using CMake I build the libs like this (paste from appveyor):
>>     - cmd: |
>>         cd "%LIBZMQ_BUILDDIR%"
>>         cmake --build . --config %Configuration% --target install
>>     - cmd: |
>>         cd "%CZMQ_BUILDDIR%"
>>         cmake --build . --config %Configuration% --target install
>> Draft methods are enabled by default. But when using a draft method I
>> get unresolved external symbols (Windows)
>> This goes away when doing #define CZMQ_BUILD_DRAFT_API before including
>> czmq.h.
>> However I'm questioning this as using make on Linux does not show this
>> and I never have needed to define this.
>> So feature or bug?
>> Rg,
>> Arnaud
> Yes - this happens automatically on *nix via pkg-config

Perhaps I could draft a PR to document this better, especially when 
using cmake. It's nice this handled by pkg-config but this is not used 
on Windows so you'd then need to set it explicitly (-DCZMQ_BUILD_DRAFT_API)?

Or any better suggestions?



More information about the zeromq-dev mailing list