androidcmakeandroid-ndkclang++caffe2

Unable to build caffe2 AICamera app


While trying to build AICamera app master branch, we failed to link the required native-lib library.

native-lib.cpp:144: error: undefined reference to 'caffe2::Predictor::run(std::__ndk1::vector<caffe2::Tensor<caffe2::CPUContext>*, std::__ndk1::allocator<caffe2::Tensor<caffe2::CPUContext>*> > const&, std::__ndk1::vector<caffe2::Tensor<caffe2::CPUContext>*, std::__ndk1::allocator<caffe2::Tensor<caffe2::CPUContext>*> >*)'

You can see the full traceback here

Please advise

Android studio: 3.1.3

NDK: 17.1.4828580


Solution

  • So the problem was with Android studio version. The app cant be compiled using it. Switching to 3.0.1 solved the problem. Also, switching to NDK 13b helps with compiling it properly.