Issue
i get many undefined reference errors when i code opencv under android NDK, such as:
system.cpp:(.text.unlikely._ZNSs4_Rep10_M_disposeERKSaIcE.part.5+0x1c): undefined reference to `std::string::_Rep::_M_destroy(std::allocator const&)'
G:/AndroidProjects/SprayingPrjJNI/app/src/main/cpp/../jniLibs/arm64-v8a/libopencv_core.a(system.cpp.o): In function `void std::_Destroy(std::string*, std::string*, std::allocator&) [clone .isra.88]':
system.cpp:(.text.unlikely._ZSt8_DestroyIPSsSsEvT_S1_RSaIT0_E.isra.88+0x18): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
system.cpp:(.text.unlikely._ZSt8_DestroyIPSsSsEvT_S1_RSaIT0_E.isra.88+0x2c): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
..................
i really dont know how to fix these errors, please help me, thanks
Solution
See NDK - problems after GNUSTL has been removed from the NDK (revision r18).
But if you don't have very strong reasons to stay with the old version of OpenCV, the easiest approach is to switch to prebuilt OpenCV 4.01 which is compatible with NDK r19.
Answered By - Alex Cohn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.