jni 이용하기위해 cpp파일을 ndk 빌드하는 과정에서 Android.mk 파일 수정 후 cygwin에서 빌드를했습니다


빌드과정에서 오류가 나는데 도무지 원인을 알수가 없어 한번 올려봅니다... 도와주십시오..


- Android.mk


LOCAL_PATH := $(call my-dir)


include $(CLEAR_VARS)


OPENCV_LIB_TYPE        := STATIC

OPENCV_INSTALL_MODULES := on

OPENCV_CAMERA_MODULES  := off


include  /home/kong/OpenCV-2.4.0/share/OpenCV/OpenCV.mk


LOCAL_MODULE    := objtrack_opencv_jni

LOCAL_SRC_FILES := objtrack.cpp

LOCAL_LDLIBS    +=  -llog -ldl


include $(BUILD_SHARED_LIBRARY)


- Cygwin에서 오류

$ ndk-build

Compile++ thumb  : objtrack_opencv_jni <= objtrack.cpp

jni/objtrack.cpp:2:33: error: opencv2/core/core.hpp: No such file or directory

jni/objtrack.cpp:3:39: error: opencv2/imgproc/imgproc.hpp: No such file or direc                   tory

jni/objtrack.cpp:4:39: error: opencv2/imgproc/imgproc_c.h: No such file or direc                   tory

jni/objtrack.cpp:5:45: error: opencv2/features2d/features2d.hpp: No such file or                    directory

jni/objtrack.cpp:9: error: 'cv' is not a namespace-name

jni/objtrack.cpp:9: error: expected namespace-name before ';' token

jni/objtrack.cpp: In function 'void Java_org_projectproto_objtrack_ObjTrackView_                   CircleObjectTrack(JNIEnv*, _jobject*, jint, jint, _jbyteArray*, _jintArray*, jbo                   olean)':

jni/objtrack.cpp:18: error: 'Mat' was not declared in this scope

jni/objtrack.cpp:18: error: expected ';' before 'mYuv'

jni/objtrack.cpp:19: error: expected ';' before 'mBgra'

jni/objtrack.cpp:20: error: expected ';' before 'mGray'

jni/objtrack.cpp:22: error: 'CvSize' was not declared in this scope

jni/objtrack.cpp:22: error: expected ';' before 'size'

jni/objtrack.cpp:23: error: 'IplImage' was not declared in this scope

jni/objtrack.cpp:23: error: 'hsv_frame' was not declared in this scope

jni/objtrack.cpp:23: error: 'size' was not declared in this scope

jni/objtrack.cpp:23: error: 'IPL_DEPTH_8U' was not declared in this scope

jni/objtrack.cpp:23: error: 'cvCreateImage' was not declared in this scope

jni/objtrack.cpp:24: error: 'thresholded' was not declared in this scope

jni/objtrack.cpp:26: error: expected ';' before 'img_color'

jni/objtrack.cpp:27: error: expected ';' before 'img_gray'

jni/objtrack.cpp:31: error: 'mYuv' was not declared in this scope

jni/objtrack.cpp:31: error: 'mBgra' was not declared in this scope

jni/objtrack.cpp:31: error: 'CV_YUV420sp2BGR' was not declared in this scope

jni/objtrack.cpp:31: error: 'cvtColor' was not declared in this scope

jni/objtrack.cpp:34: error: 'img_color' was not declared in this scope

jni/objtrack.cpp:34: error: 'CV_BGR2HSV' was not declared in this scope

jni/objtrack.cpp:34: error: 'cvCvtColor' was not declared in this scope

jni/objtrack.cpp:37: error: 'cvScalar' was not declared in this scope

jni/objtrack.cpp:37: error: 'cvInRangeS' was not declared in this scope

jni/objtrack.cpp:40: error: 'CvMemStorage' was not declared in this scope

jni/objtrack.cpp:40: error: 'storage' was not declared in this scope

jni/objtrack.cpp:40: error: 'cvCreateMemStorage' was not declared in this scope

jni/objtrack.cpp:43: error: 'CV_GAUSSIAN' was not declared in this scope

jni/objtrack.cpp:43: error: 'cvSmooth' was not declared in this scope

jni/objtrack.cpp:46: error: 'CV_GRAY2BGR' was not declared in this scope

jni/objtrack.cpp:49: error: 'CvSeq' was not declared in this scope

jni/objtrack.cpp:49: error: 'circles' was not declared in this scope

jni/objtrack.cpp:49: error: 'CV_HOUGH_GRADIENT' was not declared in this scope

jni/objtrack.cpp:50: error: 'cvHoughCircles' was not declared in this scope

jni/objtrack.cpp:55: error: 'cvGetSeqElem' was not declared in this scope

jni/objtrack.cpp:56: error: 'Point' was not declared in this scope

jni/objtrack.cpp:56: error: 'Scalar' was not declared in this scope

jni/objtrack.cpp:56: error: 'circle' was not declared in this scope

jni/objtrack.cpp:61: error: 'cvReleaseMemStorage' was not declared in this scope

jni/objtrack.cpp:62: error: 'cvReleaseImage' was not declared in this scope

/home/kong/android-ndk-r8/build/core/build-binary.mk:243: recipe for target `obj                   /local/armeabi-v7a/objs/objtrack_opencv_jni/objtrack.o' failed

make: *** [obj/local/armeabi-v7a/objs/objtrack_opencv_jni/objtrack.o] Error 1



 -공지사항 읽어보았습니다-