What is the difference between local_shared_libraries local_ldlibs in ndk?
I first compiled a. So file and then called it for this compilation. What is the difference between using local_shared_libraries and local_ldlibs? I can use the latter to compile it, but not using the former. Thank you !!
1. The shared library should be placed in other programs and can also be called. Non-shared libraries can only be called in this program.
I don't know, do you?
2. When I use local_ldlibs for compilation, the following error occurs: ndroideabi/bin/ld.exe: cannot find-lssl.
3. I just read the source code. The directory/framework/base/Media/JNI has an android. MK file, which contains the following sentence: local_ldlibs: =-lpthread; this reminds me of the need to add the compilation parameter-lpthread (introduce libpthread. so shared library ). Local_ldlibs: =-lpthread is also used to introduce the libpthread. So library, and I do not know the difference between the two .....
4. Some people just checked out: "local_ldlibs is used to call a third-party library ".
5. In your case, in your "mydrdoid", if you use: local_ldlibs: =-lskia "... Then, libskia. So * need not * be rebuilt.
Whereas, if you use: local_shared_libraries: = libskia... Then libskia. So * will * be rebuilt if there are any changes in it's dependencies.
6. raviy
Thanks for your explanation
Also I found that local_ldlibs in mydroid can only work
Host_shared_libs
But not for target shared libs
Thanks
On Nov 30, 11: 52 AM, raviy <[email protected]> wrote:
> Libraries that are linked via local_ldlibs will not have any
> Dependencies generated for them. So, typically, local_ldlibs shocould be
> Used when you don't want to or don't have the resources to build
> Specific library. So, if you are using a library provided by the ndk,
> You * technically * don't need to rebuild the provided libraries.
>
> SO, in your case, in your "mydrdoid", if you use:
> Local_ldlibs: =-lskia "... then, libskia. So * need not * be rebuilt.
> Whereas, if you use:
> Local_shared_libraries: = libskia... then libskia. So * will * be
> Rebuilt if there are any changes in it's dependencies.
>
>-Ravi
>
> On Nov 30, 7: 20 am, allstars <[email protected]> wrote:
>
> Hello
> I wowould like to ask the differences
> Local_shared_libraries and local_ldlibs
>
> For example, I try to link skia
>
> In mydroid
>
> I need to use local_shared_libraries = libskia
>
> But in ndk
> I need to use local_ldlibs =-lskia
>
> So I am wondering what's the differences
> And why do I need to two different ways for my android. mk
>
> Thanks
>
From: http://www.eoeandroid.com/thread-45413-1-1.html
What is the difference between local_shared_libraries local_ldlibs in ndk?