I am trying to create an android application that is called on a C ++ backend. This backend uses ZeroMQ for messaging. On the Android build page page in the ZeroMQ manual, I created my own ndk version 6 binding and used it to (successfully) build ZeroMQ.
However, when I create my own .so with JNI implementations, I cannot get everything to load correctly. In particular, if I call System.LoadLibrary ("zmq"), it succeeds, but if I then call * System.LoadLibrary ("my_lib") *, I always get an UnsatisfiedLinkError complaining that:
Cannot load library reloc_library[1244]: 29 cannot locate zmq_msg_init'...
libmy_lib.so was created in several different ways, each of which is unsuccessful. After generation, I always copy libmy_lib.so (as well as libzmq.so) into my Android project folder: libs / armeabi /.
# Compile all object files - this part was done for all options /opt/android-toolchain/bin/arm-linux-androideabi-g++ -fpic -c Client_Events.cpp \ Client Wrapper.cpp jni.cpp -I /opt/android-root/include/ -I /my/project/specific/stuff
With each of these options, I tried to explicitly call System.LoadLibrary ("zmq") before loading my own library, not. Nothing changed the results. Using nm confirms that, at least in the case of option # 2, the missing * zmq_msg_init * character is indeed present in libmy_lib.so.
Any ideas as to why he cannot find the ZeroMQ characters that are related in?
source share