[zeromq-dev] Issue linking ZMQ static library into shared library for Android

Matthias Brzezinski Matthias.Brzezinski at gmx.de
Fri Mar 6 15:30:24 CET 2015

I'm having issues linking ZeroMQ into my shared library for Android.

I followed the steps on http://zeromq.org/build:android to build the 
static library. I tried it with the recommended NDKr8 but also tried it 
with the NDK10d. I've build the static library for arm with the official 
Afterwards I try to link thoose libraries into my shared library to 
compile a bunch of cpp files.
I've successfully compiled and linked different static libraries into my 
projects so I'm pretty confused why the linker throws the Error when I 
work with ZeroMQ. I've omitted the other working libraries.
My Android.mk:

My Application.mk:

In both code blocks I've ommited everything that is not necessary for 
solving this issue. The error message stays the same. I've tried to 
build the shared library under windows and later under debian and 
ubuntu. The error message is:

error: ./zmq/lib    /libzmq.a(libzmq_la-zmq.o): incompatible target
     collect2: error: ld returned 1 exit status
     make: *** [obj/local/armeabi/libzmqTest.so] Error 1
(I guess 3 lines are not worth a pastebin)

I'm working on Windows 8.1 with Android Studio 1.1. I've compiled the 
libraries under Linux Mint 16, a up-to-date ubuntu system and an old 
debian server.
I build zeromq3-x and zeromq4-x.

Any idea is welcome and appreciated.

If this is not the right place to ask such a question, please tell me 
where to ask it instead.

With regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150306/daa57cdb/attachment.htm>

More information about the zeromq-dev mailing list