I can't compile JNI file
Hello,
This is the question I asked on stackoverflow., but nobody can help me.
I will ask the same question here. I'm trying to build simple android app with some JNI code. I already try this [suggestion][1], but isn't help
When I press build project in eclipse I get this error:
Description Resource Path Location Type
fatal error: algorithm: No such file or directory Tracker line 56, external location: /home/slani/code/OpenCV-2.4.6-android-sdk/sdk/native/jni/include/opencv2/core/core.hpp C/C++ Problem
make: *** [obj/local/armeabi/objs/detect_jni/detect_jni.o] Error 1 Tracker C/C++ Problem
Line 56 in core.hpp contains the relevant include.
This is my Android.mk file jni folder:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include /home/slani/code/OpenCV-2.4.6-android-sdk/sdk/native/jni/OpenCV.mk
LOCAL_MODULE := detect_jni
LOCAL_SRC_FILES := detect_jni.cpp
include $(BUILD_SHARED_LIBRARY)
This is my Aplication.mk file in jni folder:
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
APP_ABI := all
APP_PLATFORM := android-8
This is my .cpp file:
#include <jni.h>
#include <opencv/cv.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
using namespace cv;
extern "C"{
JNIEXPORT void JNICALL Java_com_slani_tracker_OpenCamera_findObject((JNIEnv *env, jlong addRgba, jlong addHsv);
JNIEXPORT void JNICALL Java_com_slani_tracker_OpenCamera_findObject((JNIEnv *env, jlong addRgba, jlong addHsv)
{
Mat& rgba = *(Mat*)addRgba;
Mat& hsv = *(Mat*)addHsv;
cvtColor(rgba, hsv,CV_RGBA2HSV);
}
}
![This is my path and symbols in eclipse
Thanks
-1 for just quoting a so question here. more effort, please ;)
Should I rewrite the same question???
Please help me
hey, i whish i could !
I'm very frustrated. I don't know what to do. I went through all steps thousand times.
I don.t know why ndk-build wont find android file. Very strange is, if I compile with ndk-build OpencCv samples it's build normaly. ndk-build finds all file. I also try include complete path to algorithme file in core file. But then I get error to find next file include in algorithm file.