使用NDK建立时未定义的OpenCV /非自由/ features2d未定义、自由、NDK、features2d

2023-09-04 04:43:35 作者:我姓王我心亡

当我使用NDK建造,我总是得到这个错误,这奇怪的指向OpenCV库code。

When I was using ndk-build, I always got this error, which strangely points to opencv library code.

这是我得到的错误信息:

This is the error message I got:

./obj//armeabi/objs/QRCA/QRCA.o: In function `~SURF`:
/----Path---/../sdk/native/jni/include/opencv2/nonfree/features2d.hpp:107: undefined reference to `vtable for cv::SURF`
/----Path---/../sdk/native/jni/include/opencv2/nonfree/features2d.hpp:107: undefined reference to `VTT for cv::SURF`
./obj/local/armeabi/objs/QRCA/QRCA.o: In function `fmatch(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >):`
/----Path---/jni/QRCA.cpp:28: undefined reference to `cv::SURF::SURF(double, int, int, bool, bool)`
/----Path---/jni/QRCA.cpp:36: undefined reference to `cv::SURF::SURF()`
./obj/local/armeabi/objs/QRCA/QRCA.o: In function `std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >::_M_range_check(unsigned int) const:`
~/Downloads/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/stl_vector.h:780: undefined reference to `vtable for cv::SURF`
~/Downloads/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/stl_vector.h:780: undefined reference to `VTT for cv::SURF`

这是我的Andr​​oid.mk:

This is my Android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

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

LOCAL_MODULE    := QRCA
LOCAL_SRC_FILES := QRCA.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS +=  -llog -ldl
LOCAL_WHOLE_STATIC_LIBRARIES := gnustl_static

include $(BUILD_SHARED_LIBRARY)

任何建议多AP preciated!

Any suggestion is much appreciated!

推荐答案

请,谷歌前询问的问题。这里的回答是:

Please, Google before asking question. Here's answer:

http://answers.opencv.org/question / 445/242的Andr​​oid缺失,非自由封装/

 
精彩推荐
图片推荐