Re: Unable to link prebuilt shared library to another library

510 views
Skip to first unread message

David Turner

unread,
Sep 11, 2012, 7:02:13 AM9/11/12
to andro...@googlegroups.com
Looks like the build is looking for a library called "prebuilt.so" while the one you have is called "libprebuilt.so" instead.
Not sure if this is a ndk-build or not, but try naming the prebuilt module "libprebuilt" instead then.

On Fri, Sep 7, 2012 at 4:51 PM, Arun <arunk.s...@gmail.com> wrote:
Hi Everyone,

I am trying to link a prebuilt shared library from another library as shown below.
This is a common error, I tried the procedure given in NDK docs but it doen't help.

Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := prebuilt
LOCAL_SRC_FILES := ./libriaries/libprebuilt.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := mylib
LOCAL_MODULE_TAGS := optional

LOCAL_C_INCLUDES := 
LOCAL_SRC_FILES := mylib.c
LOCAL_LDLIBS := -L$(LOCAL_PATH)/libraries           # adding/removing this line has no effect
LOCAL_SHARED_LIBRARIES := prebuilt

include $(BUILD_SHARED_LIBRARY)

The error message I get is,
make: *** No rule to make target 'out/target/product/<name>/obj/lib/prebuilt.so', needed by 'out/target/product/<name>/obj/SHARED_LIBRARIES/libmylib_intermediates/LINKED/libmylib.so'. Stop.

This is with android-ndk-r8 version and I think libprebuilt.so is also built with the same version.
Could someone provide any suggestions on how to resolve this?

-br
Arun

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/1T81UyS8TK4J.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Reply all
Reply to author
Forward
0 new messages