【问题标题】:where is the dynamic library file(.so) for sharedmem.h of Android NDK?Android NDK 的 sharedmem.h 的动态库文件(.so)在哪里?
【发布时间】:2021-01-12 07:58:42
【问题描述】:

我正在尝试构建 NNAPI c++ 本机程序,我需要使用 sharedmem 库。 我找到了 NeuralNetwork.h 的动态库文件,但是我找不到 sharedmem.h 的动态库文件。因此我有一个链接器错误,例如,

ld: error: undefined symbol: ASharedMemory_create
>>> referenced by simple_model.cc
>>>               CMakeFiles/main.dir/src/simple_model.cc.o:(SimpleModel::SimpleModel(unsigned long, int, int, unsigned long))
>>> referenced by simple_model.cc
>>>               CMakeFiles/main.dir/src/simple_model.cc.o:(SimpleModel::SimpleModel(unsigned long, int, int, unsigned long))
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

如何链接 sharedmem.h 文件。

【问题讨论】:

    标签: android c++ c android-ndk nnapi


    【解决方案1】:

    也许有更好的方法,但是使用过滤器file:.*\.map\.txt 搜索函数名会找到它定义在的库:https://cs.android.com/search?q=ASharedMemory_create%20file:.*%5C.map%5C.txt&ssfr=1

    在本例中是 libandroid。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-13
      • 2017-03-17
      • 2012-11-12
      • 2012-12-28
      • 1970-01-01
      • 2015-09-07
      相关资源
      最近更新 更多