zoukankan      html  css  js  c++  java
  • 请问大家ndk中LOCAL_SHARED_LIBRARIES LOCAL_LDLIBS什么区别

    请问大家ndk中LOCAL_SHARED_LIBRARIES LOCAL_LDLIBS什么区别啊
    我先是编译了一个.so 然后在此次编译的使用调用,请问用LOCAL_SHARED_LIBRARIES和LOCAL_LDLIBS什么区别啊,我用后者能编译通过,用前者不行呢,谢谢!!

    1.共享库放在其他程序里面也应该可以调用   非共享库只能在本程序调用   
       我想是这样的  不知道对不对

    2.我用LOCAL_LDLIBS,编译的时候,提示:ndroideabi/bin/ld.exe: cannot find -lssl

    3.我刚看了下源码,目录/framework/base/media/jni下有个Android.mk文件,里面有这样一句话:LOCAL_LDLIBS := -lpthread;这让我联想到了编译c线程程序时需要加编译参数-lpthread(引入libpthread.so共享库)。 LOCAL_LDLIBS := -lpthread作用也是引入libpthread.so库,也是不知两者区别在哪里,,求高手解答。。。。。

    4.刚查了下,有的人讲:“由于要调用第三方库,所以用到了 LOCAL_LDLIBS” 。

    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 for
    HOST_SHARED_LIBS
    but not for TARGET SHARED LIBS

    thanks

    On Nov 30, 11:52 am, RaviY <yend...@xxxxxx> wrote:
    > Libraries that are linked via LOCAL_LDLIBS will not have any
    > dependencies generated for them. So, typically, LOCAL_LDLIBS should be
    > used when you don't want to or don't have the resources to build the
    > 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 <allstars....@xxxxxxxxx> wrote:
    >
    > > hello
    > > i would like to ask the differences between
    > > 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

  • 相关阅读:
    基于GDAL库,读取.grd文件(以海洋地形数据为例)Java版
    基于GDAL库,读取.nc文件(以海洋表温数据为例)C++版
    基于UDP传输协议局域网文件接收软件设计 Java版
    基于Oracle数据库登陆界面及功能实现 Java版
    ORM中的Model与DDD中的DomainModel
    探讨DDD中角色权限与DCI的使用
    哈工大软件构造 复习
    python列表的基本用法
    matlab简单的超越方程求解近似值
    MATLAB一些常用的function
  • 原文地址:https://www.cnblogs.com/royi123/p/3985151.html
Copyright © 2011-2022 走看看