OpenCV .so library for Android
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?
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.
@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.
If you link against OpenCV statically, you do not need this call. Everything that is needed has been already added by linker.
Asked: 2013-12-29 21:49:10 -0600
Seen: 884 times
Last updated: Dec 30 '13
@Torcellite Did you find a solution?