0
votes

I'm developing real-time FaceDetection app.

originally, this app used OpenGL to read/write image and OpenCL for parallel process with JNI. and this app properly was operated.

currently, I want to import OpenCV for using several OpenCV functions and Mat data type. so, set up the OpenCV lib in my project.

however, this project cannot build .so file.


./obj/local/armeabi-v7a/objs/JNIGLCL/JNIpr.o: In function cv::Mat::release()': C:/Users/CVLAB/Desktop/adt-bundle-windows-x86_64-20140702/OpenCV-2.4.9-android-sdk/sdk/native/jni/include/opencv2/core/mat.hpp:367: undefined reference tocv::Mat::deallocate()' ./obj/local/armeabi-v7a/objs/JNIGLCL/JNIpr.o: In function ~Mat': C:/Users/CVLAB/Desktop/adt-bundle-windows-x86_64-20140702/OpenCV-2.4.9-android-sdk/sdk/native/jni/include/opencv2/core/mat.hpp:278: undefined reference tocv::fastFree(void*)' collect2: ld returned 1 exit status make: *** [obj/local/armeabi-v7a/libJNIGLCL.so] Error 1

**** Build Finished ****


OpenCV.mk file

LOCAL_PATH:= $(call my-dir)

OPENCV_INSTALL_MODULES:=on
OPENCV_LIB_TYPE:=STATIC

include C:/Users/CVLAB/Desktop/adt-bundle-windows-x86_64-20140702/OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCV.mk

LOCAL_MODULE     := JNIGLCL
LOCAL_CXXFLAGS   += -fno-exceptions
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS     := -lGLESv2 -lEGL -ldl -llog -landroid -lOpenCL
LOCAL_SRC_FILES  := JNIpr.cpp

include $(BUILD_SHARED_LIBRARY)

I include OpenCV library.

property - Android - Library

I set the property - C/C++ General - Paths and Symbols - GNU C++ add this absolute path : C:/Users/CVLAB/Desktop/adt-bundle-windows-x86_64-20140702/OpenCV-2.4.9-android-sdk/sdk/native/jni/include

But, console print above error...

1

1 Answers

2
votes

Try instead

LOCAL_LDLIBS += -lGLESv2 -lEGL -ldl -llog -landroid -lOpenCL