Android NDK:无存档符号表(运行ranlib) [英] Android NDK: no archive symbol table (run ranlib)

查看:295
本文介绍了Android NDK:无存档符号表(运行ranlib)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在更新项目以使用Android ndk 16b,而以前使用的是12b(工作正常).更新后,在构建最终的.so时遇到以下错误:

I am updating my projects to use Android ndk 16b and it was previously using 12b (was working fine). After I updated, I am running into the following error while building the final .so:

/Users/ssk/code/client/git/thirdparty/android-ndk-r16b/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: jni/../../../shared-library/SharedCommon/build/arm-linux-androideabi/lib/libSharedCommon.a: no archive symbol table (run ranlib)

这导致了许多链接器错误.我尝试了以下答案:

This is leading to a bunch of linker errors. I tried the following answers:

Android NDK:无存档符号表

如何在档案上运行ranlib是通过Android.mk构建的?

没有存档符号表格(运行ranlib),同时通过ndk-build

没有运气.

推荐答案

您需要使用GNU AR构建静态库(就像我们在NDK中包含的那样,与GCC位于同一目录).达尔文的AR是不会自动执行ranlib任务的BSD AR.

You need to build static libraries with a GNU AR (like the one we include in the NDK, same directory as GCC). Darwin's AR is a BSD AR that does not automatically perform ranlib tasks.

这篇关于Android NDK:无存档符号表(运行ranlib)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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