[zeromq-dev] Compile statically libzmq and czmq

Matt Connolly matt.connolly at me.com
Tue Oct 15 23:56:47 CEST 2013


Depending on your needs you may also need to set up cross-compiling for different architectures which can be a pain (especially important for iOS).

I haven’t done the exact steps you’ve done below for Mac, but I did have a play with building zmq with cocoapods. I’ve set up a branch to test Cocoapods integration. See my branches on github here:


You can use them in a pod file, like so:

pod 'ZeroMQ', :git => 'https://github.com/mattconnolly/libzmq.git', :branch => 'cocoapods'
pod 'czmq', :git => 'https://github.com/mattconnolly/czmq.git', :branch => 'cocoapods'

I had it working at one point, but it’s not right now I’m afraid - it’s a work in progress. I might get some time to look at it again later in the week - any help appreciated! 


On 16 Oct 2013, at 7:06 am, Kerrigan29a <kerrigan29a at hotmail.com> wrote:

> I'm trying to compile libzmq and czmq statically on a Mac OSX Mountain Lion.
> To compile libzmq (3.2.4) I've used:
>    ./configure --enable-static --disable-shared --prefix=/tmp/build && make && make install
> and it worked. Then I tried to compile czmq (1.4.1):
>    ./configure --enable-static --disable-shared --prefix=/tmp/build --with-libzmq=/tmp/build && make && make install
> but in the configuration stage I got the following error:
>    checking for zmq_init in -lzmq... no
>    configure: error: cannot link with -lzmq, install libzmq.
> It's not possible to compile both libs statically? or I'm missing something.
> Thanks for your time.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list