Ask Your Question
0

OpenCV-android 2.4.7.1 linker error: undefined reference to 'typeinfo'

asked 2013-12-05 22:36:38 -0600

ryan0270 gravatar image

Building an ndk-based project for android and I get a bunch of linker errors such as

OpenCV-2.4.7.1-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_flann.a(miniflann.cpp.o):miniflann.cpp:function cvflann::anyimpl::typed_base_any_policy<double>::type(): error: undefined reference to 'typeinfo for double'

All the errors are of the same type and within flann. I'm using ndk r9b with gcc-4.8. Also, I don't have this problem with 2.4.7. What changed in 2.4.7.1 that might cause this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-12-06 09:52:29 -0600

OpenCV4Android SDK 2.4.7.1 was build with GCC 4.6 and GNU STL static, try to change the compiler or/and STL type.

edit flag offensive delete link more

Comments

I am also using GNU STL static.

Unfortunately, I'm using c++11x features so can't go back to gcc 4.6. Which version gcc was 2.4.7 built with?

ryan0270 gravatar imageryan0270 ( 2013-12-07 19:57:17 -0600 )edit

It was the same compiler and same NDK. I recommend you to create small issue reproducer and file a bug on code.opencv.org

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-12-08 04:16:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-05 22:36:38 -0600

Seen: 484 times

Last updated: Dec 06 '13