3rdparty/TNN/source/tnn/device/opencl/CMakeFiles/TNNOpenCL.dir/acc/convolution/opencl_conv_layer_common_acc.cc.o: No such file or directory
[670/673] Building CXX object 3rdparty/TNN/source/tnn/device/arm/CMakeFiles/TNNArm.dir/acc/arm_reduce_l2_layer_acc.cc.o
[671/673] Building CXX object 3rdparty/TNN/source/tnn/device/arm/CMakeFiles/TNNArm.dir/acc/arm_reduce_min_layer_acc.cc.o
[672/673] Linking CXX static library 3rdparty\TNN\libTNN.a
FAILED: 3rdparty/TNN/libTNN.a
cmd.exe /C "cd . && E:\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E remove 3rdparty\TNN\libTNN.a && E:\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ar.exe qc 3rdparty\TNN\libTNN.a @CMakeFiles/TNN.rsp && E:\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ranlib.exe 3rdparty\TNN\libTNN.a && cd ."
E:\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ar.exe: 3rdparty/TNN/source/tnn/device/opencl/CMakeFiles/TNNOpenCL.dir/acc/convolution/opencl_conv_layer_common_acc.cc.o: No such file or directory
ninja: build stopped: subcommand failed.
大概原因应该是低ndk版本中缺乏某个编译需要的东西,导致编译 .o 文件失败了,导致链接错误。
解决方案:
换ndk版本(尽量高点的)
ndk.dir=E\:\\xxx\\xxx\\Android\\Sdk\\ndk\\25.1.8937393