nihui / ncnn-android-mobilenetssd

The mobilenetssd object detection android example
91 stars 28 forks source link

无法找到底层接口函数 #2

Closed cmdbug closed 4 years ago

cmdbug commented 4 years ago

按说明一步步做了,编译时都是类似这样的: pipeline.cpp:function ncnn::Pipeline::destroy(): error: undefined reference to 'vkDestroyPipeline' ..... xxxxxxx.cpp:function ncnn::Pipeline::xxxxxxxx(): error: undefined reference to 'xxxxxxxxxx' 如何解决呢? image

nihui commented 4 years ago

你是用这个cmake编译的? https://github.com/nihui/ncnn-android-mobilenetssd/blob/master/app/src/main/jni/CMakeLists.txt

cmdbug commented 4 years ago

你是用这个cmake编译的? https://github.com/nihui/ncnn-android-mobilenetssd/blob/master/app/src/main/jni/CMakeLists.txt

clone 工程后,下载最新的 ncnn-android-vulkan-lib.zip 文件复制到 jni 文件夹,除了修改工程 SDK,NDK,Gradle 的版本外没动其它代码

cmdbug commented 4 years ago

android studio 4.0 ndk:21.3.6528147 sdk:29 gradle:6.1.1 buildToolsVersion "29.0.3" cmake:3.10.2

cmdbug commented 4 years ago

解决了,vulkan库必须用安卓7.0及以上的手机。