Wednesday, July 20, 2011

[android-developers] Re: Linking libevent library problem while using NDK.

Thanx

On Jul 21, 4:36 am, Mark Murphy <mmur...@commonsware.com> wrote:
> Step #1: Join the [android-ndk] Google Group.
>
> Step #2: Ask there.
>
>
>
>
>
>
>
>
>
> On Wed, Jul 20, 2011 at 2:43 PM, Giyoung Nam <nky...@gmail.com> wrote:
>
> > I want to convert my c files(which implemented with libevent) to library
> > using NDK.
> > But when I build these files, it failed. (Of course I already installed
> > libevent API)
> > The first error was
> > event2/event.h : No such files or ....
> > so i copied  directory which contained event.h to jni and
> > LOCAL_C_INCLUDES := $(LOCAL_PATH)/event/include
> > in Android.mk  and solved
> > but after that, builder couldn't find libevent library, and I also typed
> > LOCAL_LDLIBS += -L$(SYSROOT)/usr/local/lib/ -levent
> > and error occurs like
>
> > /home/<username>/android-ndk-r5c/toolchains/arm-linux-androideabi-4.4.3/pre built/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm- linux-androideabi/bin/ld:
> > cannot find -levent
> > how can i fix it??
>
> > I used android-ndk-r5c and installed libevent-2.0.12-stable version. And my
> > machine is Ubuntu 11.04
>
> > Android.mk:
> > ...
> > include $(CLEAR_VARS)
> > #LOCAL_STATIC_LIBRARIES := LOCAL_WHOLE_STATIC_LIBRARIES
> > LOCAL_MODULE    :=  <blah blah>
> > LOCAL_SRC_FILES := \
> >     manager.c \
> >     asdf.c \
> > LOCAL_C_INCLUDES := $(LOCAL_PATH)/event/include
> > LOCAL_LDLIBS += -L$(SYSROOT)/usr/local/lib/ -levent
>
> > include $(BUILD_SHARED_LIBRARY)
>
> > Error
> > Compile thumb  : asfd <= dsfr.c
> > Compile thumb  : sdfr <= asdfn.c
> > SharedLibrary  : libasfdwadfsga.so
> > /home/<asdfsad>/android-ndk-r5c/toolchains/arm-linux-androideabi-4.4.3/preb uilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-l inux-androideabi/bin/ld:
> > cannot find -levent
> > collect2: ld returned 1 exit status
> > make: ***
> > [/home/elfrog/workspace/DTNManager/obj/local/armeabi/libdtn_manager.so] 오류 1
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment