Ask Your Question

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

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

ryan0270 gravatar image

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

OpenCV- 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 that might cause this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

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

OpenCV4Android SDK 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


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 -0500 )edit

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

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

Question Tools

1 follower


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

Seen: 361 times

Last updated: Dec 06 '13