LOCAL_LDLIBS与LOCAL_LDFLAGSLOCAL_LDLIBS、LOCAL_LDFLAGS

由网友(战天傲刃)分享简介:而Android NDK指南说明两个变量 Adnroid.mk 如下: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. ...

安装cvs 时 提示 error writing to registry key HKEY LOCAL MACHINE

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

阅读全文

相关推荐

最新文章