android - NDK - include error -
i need because drives me crazy. cause error?
the error is
"jni/algorithm.cpp:4:33: fatal error: opencv2/core/core.hpp: no such file or directory #include <opencv2/core/core.hpp> ^ compilation terminated. make: *** [obj/local/arm64-v8a/objs/algorithm/algorithm.o] error 1"
my algorithm.cpp is:
#include <jni.h> #include <string.h> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/features2d/features2d.hpp> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc_c.h" using namespace std; using namespace cv; extern "c" { jniexport jlong jnicall java_com_example_hematoma_mainactivity_fce(jnienv *env, jobject obj, jlong matimage) { mat *jni_image = (mat*) matimage; return (jlong)jni_image; } }
my android.mk is:
local_path := $(call my-dir) include /home/nemesis/adt-bundle-linux-x86_64-20140702/opencv-2.4.10-android-sdk/sdk/native/jni/opencv.mk include $(clear_vars) local_module := algorithm local_src_files := algorithm.cpp local_c_include := /home/nemesis/adt-bundle-linux-x86_64-20140702/opencv-2.4.10-android-sdk/sdk/native/jni/include/opencv2/core/core.hpp local_c_include += /home/nemesis/adt-bundle-linux-x86_64-20140702/opencv-2.4.10-android-sdk/sdk/native/jni/include/ include $(build_shared_library)
the error occurs when ndk try build .so
thanks in advance.
local_c_include := /home/nemesis/adt-bundle-linux-x86_64-20140702/opencv-2.4.10-android-sdk/sdk/native/jni/include/opencv2
should be
local_c_includes := /home/nemesis/adt-bundle-linux-x86_64-20140702/opencv-2.4.10-android-sdk/sdk/native/jni/include
ie, plural , should point location following relative path:
#include <opencv2/core/core.hpp>
Comments
Post a Comment