Sunday, April 14, 2013

[android-developers] Re: How to link a library whose name does not begin with lib in Android??

You need to read PREBUILTS.html in the NDK docs.

On Sunday, April 14, 2013 11:28:23 AM UTC+1, serene wrote:












 

I have a basic question on Android build system. I created a shared library with name myservice (LOCAL_MODULE := myservice) which created a myservice.so under /system/lib

I tried to create an application that uses this myservice and Android.mk file for this application contains LOCAL_SHARED_LIBRARIES := myservice

When I built the code, there were link errors (undefined references to ...).

After struggling for sometime I renamed the so as libmyservice (LOCAL_MODULE := libmyservice), updated the Android.mk file of application as LOCAL_SHARED_LIBRARIES := libmyservice

When I built the code I was able to get the executable!!!. I am confused about the way the build system works.

Now the myservice part of the program is not under my control because of which I can not change the name of the .so. How can I modify my Android.mk file to properly reference the myservice??

--
--
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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment