[zeromq-dev] Difficulities in Using the Built uuid and zmq Libraries

Nimish Nayak wordwarrior01 at gmail.com
Wed Jul 13 07:53:25 CEST 2011


Hi

I wanted to implement the Weather Server/Client Example given on Zero MQ
official WebSite on my Android 2.2
I went through the website http://www.zeromq.org/distro:android
I downloaded azmq folder and copied the two libraries libzmq.so and libuuid
in the libs folder of my project since I am using "android-ndk-r5c" I did
not recompile nor ran the shell script. and instead decided on using
libraries
My Android Script located under "jni" folder looks like this

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := zmq_wc
LOCAL_SRC_FILES := weatherClient.c
LOCAL_LDLIBS := -lc -lm -lstdc++
LOCAL_SHARED_LIBRARIES := uuid zmq

include $(BUILD_SHARED_LIBRARY)

when i run the "ndk-build' I get the following Errors :

 $ ../../ndk-build
SharedLibrary  : libzmq_wc.so
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/obj/local/armeabi/objs/zmq_wc/weatherClient.o:
In function `Java_com_trial_phonegap
_plugin_directorylisting_WeatherClient_GetTemperature':
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/weatherClient.c:12:
undefined reference to `zmq_init'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/weatherClient.c:17:
undefined reference to `zmq_socket'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/weatherClient.c:18:
undefined reference to `zmq_connect'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/weatherClient.c:23:
undefined reference to `zmq_setsockopt'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/obj/local/armeabi/objs/zmq_wc/weatherClient.o:
In function `s_recv':
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/zhelpers.h:75:
undefined reference to `zmq_msg_init'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/zhelpers.h:76:
undefined reference to `zmq_recv'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/zhelpers.h:78:
undefined reference to `zmq_msg_size'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/zhelpers.h:80:
undefined reference to `zmq_msg_data'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/zhelpers.h:81:
undefined reference to `zmq_msg_close'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/obj/local/armeabi/objs/zmq_wc/weatherClient.o:
In function `Java_com_trial_phonegap
_plugin_directorylisting_WeatherClient_GetTemperature':
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/weatherClient.c:35:
undefined reference to `zmq_close'
C:/cygwin/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/jni/weatherClient.c:36:
undefined reference to `zmq_term'
collect2: ld returned 1 exit status
make: ***
[/home/nimesh/android-ndk-r5c/samples/DirectoryListingPhoneGapPlugin/obj/local/armeabi/libzmq_wc.so]
Error 1

I have included the SO Libraries under LOCAL_SHARED_LIBRARIES based on the
example "module-exports" provided in "android-ndk-r5c" Sample.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110713/016734e9/attachment.htm>


More information about the zeromq-dev mailing list