Ask Your Question

sviborg's profile - activity

2018-12-11 20:19:40 -0600 received badge  Nice Question (source)
2018-08-01 02:25:45 -0600 received badge  Notable Question (source)
2017-05-04 00:26:30 -0600 received badge  Popular Question (source)
2015-06-02 00:00:06 -0600 received badge  Student (source)
2015-05-06 00:21:29 -0600 asked a question OpenCV 2.4.11 NDK arm64-v8a x86_64

Hi,

I'm working on shared lib that uses static OpenCV and works perfect under 32-bit ARM's. But have a lot of unresolved symbols when building for APP_ABI arm64-v8a and x86_64.

Looks like the 64-bit OpenCV libs compiled with wrong flags, or some weird toolchain issue (because armeabi armeabi-v7a mips x86 works OK). Any ideas?

arm64-v8a configure log: http://www.everfall.com/paste/id.php?...

arm64-v8a build log: http://www.everfall.com/paste/id.php?...

Short x86_64 error log:

ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::pyrDown(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int> const&, int)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::threshold(cv::_InputArray const&, cv::_OutputArray const&, double, double, int)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::morphologyEx(cv::_InputArray const&, cv::_OutputArray const&, int, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'cv::bitwise_and(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&)'
ccmkDP4c.ltrans10.ltrans.o:ccmkDP4c.ltrans10.o:function PickAnalyzer::DetectSlots(): error: undefined reference to 'vtable for cv::_OutputArray'

[Application.mk]

APP_PLATFORM := android-21
APP_ABI := arm64-v8a
APP_STL := gnustl_static
APP_CPPFLAGS += -std=c++11 -frtti -fexceptions

[Android.mk]

MY_INCLUDE_FILES := -I./ -I$(LOCAL_PATH)/../ -I$(LOCAL_PATH)/include/
MY_CFLAGS := -O3 -Ofast -flto -DANDROID_NDK -DNDEBUG
MY_LDLIBS := -lm -ldl -lz -llog -landroid
MY_STL_LIB := gnustl_static

include $(CLEAR_VARS)
LOCAL_MODULE := mylib
LOCAL_CFLAGS := $(MY_CFLAGS) $(MY_INCLUDE_FILES)
LOCAL_LDLIBS := $(MY_LDLIBS)

LOCAL_SRC_FILES := ...

LOCAL_STATIC_LIBRARIES := opencv_core opencv_ml opencv_flann opencv_imgproc opencv_highgui opencv_features2d

include $(BUILD_SHARED_LIBRARY)

[OpenCV prebuild libs]

include $(CLEAR_VARS)
LOCAL_MODULE    := opencv_core
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_core.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := opencv_ml
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_ml.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := opencv_flann
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_flann.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := opencv_imgproc
LOCAL_SRC_FILES := libs_static/$(TARGET_ARCH_ABI)/libopencv_imgproc ...
(more)