sh1r0 / caffe-android-demo

An android caffe demo app exploiting caffe pre-trained ImageNet model for image classification
https://github.com/sh1r0/caffe-android-lib
MIT License
255 stars 165 forks source link

Integration with android Project #Failure -- missing headers #25

Closed aliceresponde closed 8 years ago

aliceresponde commented 8 years ago

Hi, How are you? I have an issue in my project and I was wondering if you could help me . I'm trying to integrate your libcaffe.so files for each architecture armeabi armeabi-v7a x86 arm64-v8a x86_64 in own jni folder

Here is our Application.mk APP_STL := gnustl_static APP_CPPFLAGS := -std=c++11 -frtti -fexceptions APP_ABI := armeabi armeabi-v7a x86 arm64-v8a x86_64 APP_PLATFORM := android-8 NDK_TOOLCHAIN_VERSION := 4.9

We load it in the Android.mk include $(CLEAR_VARS) LOCAL_MODULE := caffe LOCAL_SRC_FILES := ../caffe/$(TARGET_ARCH_ABI)/libcaffe.so LOCAL_C_INCLUDES += include/boost include/caffe include/gflagas include/glog include/google/protobuf include $(PREBUILT_SHARED_LIBRARY)

I load the caffe module this way LOCAL_SHARED_LIBRARIES += caffe

after run ndk-build we get the error message missing cblas.h

then we include openBlas headers from the official site

now we have this error:

*_jni/OpenBLAS/lapack-netlib/CBLAS/include/cblas.h:27:28: fatal error: cblas_mangling.h: No such file or directory

include "cblas_mangling.h"

*_

The question is :

could you tell me which are the correct headers that we must to include to make it work.

Thanks

sh1r0 commented 8 years ago

Hi @aliceresponde, I've created a sample for using prebuilt caffe libs in a ndk project. The sample works for me to build caffe_jni with ndk-build.

sh1r0 commented 8 years ago

Any updates?