Ask Your Question

Revision history [back]

Problem linking static library OpenCV 2.4.5 Android

I am getting the following error:

bash C:\NVPACK\android-ndk-r8e\ndk-build Android NDK: ERROR:jni/Android.mk:opencv_contrib: LOCAL_SRC_FILES points to a missing file
/cygdrive/c/NVPACK/android-ndk-r8e/build/core/prebuilt-library.mk:45: * Android NDK: Aborting . Stop. Android NDK: Check that ././../libs/armeabi-v7a/libopencv_contrib.a exists or that its path is correct

My Android.mk file looks like this:

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS) OPENCV_CAMERA_MODULES:=on OPENCV_INSTALL_MODULES:=on OPENCV_LIB_TYPE:=STATIC

include D:\Users\Andra\Android\OpenCV-2.4.5-android-sdk\sdk\native\jni\OpenCV.mk

LOCAL_MODULE := frames LOCAL_SRC_FILES := csources.cpp reconstruction.cpp rectification.h rectification.cpp LOCAL_LDLIBS += -llog -ldl

LOCAL_CFLAGS := -Wall -g -mcpu=cortex-a9 -march=armv7-a -ffast-math -funroll-loops -O3

include $(BUILD_SHARED_LIBRARY)

and the Application.mk file like this:

APP_STL := gnustl_static APP_CPPFLAGS := -frtti -fexceptions APP_ABI := armeabi-v7a

What do you think I should do to get rid of the error?