简体   繁体   English

查找用于构建OpenCV Android本机库的NDK版本

[英]Find the NDK version used for building OpenCV Android native libraries

Suppose I have prebuilt OpenCV Android native libraries, such as this . 假设我已经预先构建了OpenCV Android本机库,例如this How to find which version of NDK is used for building this? 如何找到用于构建此版本的NDK版本?

I am curios about this because OpenCV 3.4.3 prebuilt Android libraries seems to incompatible (?) with NDK r18. 我对此很好奇,因为OpenCV 3.4.3预先构建的Android库似乎与NDK r18不兼容(?)。

OpenCV library contained this information. OpenCV库包含此信息。 Open the prebuilt library in Notepad++ and search for "General configuration for OpenCV". 在Notepad ++中打开预构建的库,然后搜索“ OpenCV的常规配置”。

Assuming it was built with a new enough version of the NDK (I don't remember exactly when we added this, but it's been a year or two), there's an ELF note baked into the binaries. 假设它是使用足够新版本的NDK构建的(我不记得我们何时添加它,但是已经过了一两年了),二进制文件中包含了ELF注释。 Can use https://android.googlesource.com/platform/ndk/+/master/parse_elfnote.py to parse it. 可以使用https://android.googlesource.com/platform/ndk/+/master/parse_elfnote.py进行解析。 It'll show you something like the following: 它会向您显示如下内容:

$ python parse_elfnote.py $NDK/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so
----------ABI INFO----------
ABI_ANDROID_API: 21
ABI_NDK_VERSION: r18
ABI_NDK_BUILD_NUMBER: 5002713

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM