LOCAL_LDLIBS与LOCAL_LDFLAGS [英] LOCAL_LDLIBS vs. LOCAL_LDFLAGS

查看:2557
本文介绍了LOCAL_LDLIBS与LOCAL_LDFLAGS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而Android NDK指南说明两个变量 Adnroid.mk 如下:

  

LOCAL_LDLIBS - 额外的连接器选项列表构建共享库或可执行文件时使用
。   ......


  

LOCAL_LDFLAGS - 构建共享库或可执行文件时使用的其它连接器选项的列表 - 。   ......

那么,什么是这两者之间的区别是什么?

解决方案

这可能是没有在present时间功能上的差异(或者说这是在文档中一个小的失误),但意图(按照命名这种类型的变量)的悠久传统是:

  • LOCAL_LDLIBS将指定库或者至少对象被链接到结果

  • LOCAL_LDFLAGS将指定给连接器等配置选项

The Android NDK guide explains the two variables in the Adnroid.mk as follows:

LOCAL_LDLIBS - The list of additional linker flags to be used when building your shared library or executable.
...


LOCAL_LDFLAGS - The list of other linker flags to be used when building your shared library or executable.
...

So what is the difference between these two?

解决方案

It is possible that there is not a functional difference at the present time (or that this is a minor mistake in the documentation) but the intent (in accordance with longstanding tradition of naming variables of this type) is that:

  • LOCAL_LDLIBS would specify libraries or at least objects to be linked into the result

  • LOCAL_LDFLAGS would specify other configuration options to the linker

这篇关于LOCAL_LDLIBS与LOCAL_LDFLAGS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆