Ask Your Question
2

OpenCV .so library for Android

asked 2013-12-29 21:49:10 -0600

Torcellite gravatar image

How do I build a custom. so file for all architectures for only a select few opencv header files and class files? Is this possible?

edit retag flag offensive close merge delete

Comments

@Torcellite Did you find a solution?

j.c gravatar imagej.c ( 2014-08-21 05:01:02 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-12-30 01:45:06 -0600

Yes, it is possible. Add OPENCV_LIB_TYPE:=STATIC before including OpenCV.mk in your Android.mk. This string enables static linkage with OpenCV. Linker removes all unused classes and functions automatically. You cannot build the singe shared library for all architectures. If you set target architecture to all in Application.mk you've got one shared library per architecture.

edit flag offensive delete link more

Comments

@Alexander Smorkalov I tried this, but i'm getting E/OpenCV/StaticHelper(5647): OpenCV error: Cannot load info library for OpenCV. I'm using OpenCVLoader.initDebug() to load the library.

j.c gravatar imagej.c ( 2014-08-21 05:11:04 -0600 )edit

If you link against OpenCV statically, you do not need this call. Everything that is needed has been already added by linker.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2014-09-26 10:26:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-29 21:49:10 -0600

Seen: 917 times

Last updated: Dec 30 '13