Hi all,
We've previously been successfullty using OpenCV 2.4.0 for Android in our native C++ project. We build with Android NDK r8, targeting API level 7 and later. Build host is Mac OS X 10.7.4.
Now I've just updated to OpenCV 2.4.2, and the link phase is failing, with missing symbols "mbstowcs" and "wcstombs".
android/obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In function `cv::toUtf16(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
persistence.cpp:(.text._ZN2cv7toUtf16ERKSs+0x52): undefined reference to `mbstowcs'
android/obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In function `cv::fromUtf16(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)':
persistence.cpp:(.text._ZN2cv9fromUtf16ERKSbIwSt11char_traitsIwESaIwEE+0x56): undefined reference to `wcstombs'
Our Application.mk includes:
APP_OPTIM := release
APP_ABI := armeabi armeabi-v7a x86
APP_PLATFORM := android-7
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
and our Android.mk includes:
OPENCV_PACKAGE_DIR:=$(MY_LOCAL_DIR)/jni/OpenCV-2.4.2
OPENCV_LIB_TYPE:=STATIC
OPENCV_CAMERA_MODULES:=off
include $(OPENCV_PACKAGE_DIR)/jni/OpenCV.mk
LOCAL_LDLIBS += -llog -lGLESv1_CM
LOCAL_STATIC_LIBRARIES += opencv_flann opencv_core tbb
Any ideas?