nihui / ncnn-android-yolov5

The YOLOv5 object detection android example
650 stars 134 forks source link

编译失败 error: cannot find -lFindncnn #12

Open xby377974178 opened 3 years ago

xby377974178 commented 3 years ago

Build command failed. Error while executing process C:\Users\xbo\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C F:\workspace\as_work\ncnn-android-yolov5\app.cxx\cmake\debug\armeabi-v7a yolov5ncnn} ninja: Entering directory `F:\workspace\as_work\ncnn-android-yolov5\app.cxx\cmake\debug\armeabi-v7a' [1/2] Building CXX object CMakeFiles/yolov5ncnn.dir/yolov5ncnn_jni.cpp.o [2/2] Linking CXX shared library F:\workspace\as_work\ncnn-android-yolov5\app\build\intermediates\cmake\debug\obj\armeabi-v7a\libyolov5ncnn.so FAILED: F:/workspace/as_work/ncnn-android-yolov5/app/build/intermediates/cmake/debug/obj/armeabi-v7a/libyolov5ncnn.so cmd.exe /C "cd . && C:\Users\xbo\AppData\Local\Android\Sdk\ndk\21.0.6113669\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi24 --gcc-toolchain=C:/Users/xbo/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/xbo/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libyolov5ncnn.so -o F:\workspace\as_work\ncnn-android-yolov5\app\build\intermediates\cmake\debug\obj\armeabi-v7a\libyolov5ncnn.so CMakeFiles/yolov5ncnn.dir/yolov5ncnn_jni.cpp.o F:/workspace/as_work/ncnn-android-yolov5/app/src/main/jni/ncnn-20201218-android-vulkan/armeabi-v7a/lib/libncnn.a -lFindncnn -ljnigraphics -fopenmp -static-openmp C:/Users/xbo/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/arm-linux-androideabi/24/libvulkan.so F:/workspace/as_work/ncnn-android-yolov5/app/src/main/jni/ncnn-20201218-android-vulkan/armeabi-v7a/lib/libSPIRV.a F:/workspace/as_work/ncnn-android-yolov5/app/src/main/jni/ncnn-20201218-android-vulkan/armeabi-v7a/lib/libglslang.a F:/workspace/as_work/ncnn-android-yolov5/app/src/main/jni/ncnn-20201218-android-vulkan/armeabi-v7a/lib/libOGLCompiler.a F:/workspace/as_work/ncnn-android-yolov5/app/src/main/jni/ncnn-20201218-android-vulkan/armeabi-v7a/lib/libOSDependent.a -pthread -landroid -llog -latomic -lm && cd ." C:/Users/xbo/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: error: cannot find -lFindncnn clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.

bharath5673 commented 3 years ago

im also facing the same error :(

By not providing "Findncnn.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ncnn", but CMake did not find one.

starplatinum3 commented 2 years ago

请问你解决了吗

starplatinum3 commented 2 years ago

这个可以跑 https://github.com/hdu-CXSJ/GarbageClassification

thinkercsl commented 2 years ago

可以试试修改ncnn-android-yolov5-master\app\src\main\jni中的CMakeLists.txt文件 删掉下图文件中的中蓝色部分 屏幕截图 2022-07-24 152947

starplatinum3 commented 2 years ago

可以试试修改ncnn-android-yolov5-master\app\src\main\jni中的CMakeLists.txt文件 删掉下图文件中的中蓝色部分 屏幕截图 2022-07-24 152947

谢谢