Ask Your Question
0

native opencv for android project

asked 2013-03-23 01:58:17 -0600

pocahentez gravatar image

updated 2013-03-23 01:59:22 -0600

I tried to integrate opencv library in my android project so i followed this link: http://stackoverflow.com/questions/13353647/building-native-opencv-for-android-with-eclipse-gives-undefined-reference-to-c?answertab=oldest#tab-top

but now i still have these errors:

jni/DetectionBasedTracker.cpp:5:23: error: opencv/cv.h: No such file or directory jni/DetectionBasedTracker.cpp:6:28: error: opencv/highgui.h: No such file or directory

should i change the application.mk?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-03-23 03:17:13 -0600

Marwen Z gravatar image

no , is your Android.mk reference to OpenCV.mk ? LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

include ../../sdk/native/jni/OpenCV.mk

LOCAL_MODULE := Xxx LOCAL_SRC_FILES := Xxxx.cpp LOCAL_LDLIBS += -llog -ldl

include $(BUILD_SHARED_LIBRARY)

and do you add

${NDKROOT}/platforms/android-9/arch-arm/usr/include ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/4.6/include ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include ${ProjDirPath}/../../sdk/native/jni/include

( Open Project Properties -> C/C++ General -> Paths and Symbols and add the following Include paths for C++: )

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-23 01:58:17 -0600

Seen: 1,561 times

Last updated: Mar 23 '13