Ask Your Question

PicaKuo's profile - activity

2014-10-02 22:03:51 -0600 asked a question Could I decide which module I would like to have in opencv shared library?

Hi, Sirs: I apply opencv library in my native code development, and, its original library's size is around 10MB. It is too large for my application. And, I think there are some modules like video part and etc. unused in my application. Could I build a shared library to get rid of these unused modules for Android device?

Any helps are appreciated!!

BR, Pico

2014-09-08 21:28:01 -0600 asked a question How could I get rid of linking error with built static opencv lib on Android building environment?

Hi, Sir: We apply opencv2.1 to be our image algorithm lib base. And, we can built out static libs from the source code. However, we always get link error below when we want to have our shared lib with built static opencv libs.


ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h:343: error: undefined reference to 'std::bad_alloc::bad_alloc()' ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h:343: error: undefined reference to 'std::bad_alloc::bad_alloc()' ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h:343: error: undefined reference to 'std::bad_alloc::bad_alloc()' ndk/sources/cxx-stl/stlport/stlport/stl/_alloc.h:343: error: undefined reference to 'std::bad_alloc::bad_alloc()'


I show part of my Android.mk below. (PS: we don't use Application.mk due to we don't apply ndk-build directly)

---------- My own Android.mk LOCAL_CFLAGS := -O3 LOCAL_CPPFLAGS := -O3 -fexceptions -frtti

LOCAL_SRC_FILES:= \ libbokeh/inhousefft.cpp \ libbokeh/inhouse.cpp \

LOCAL_SHARED_LIBRARIES := \ libcutils \ libjpeg \ libgnustl_shared \ libstlport_shared \

LOCAL_LDFLAGS += -ldl

LOCAL_STATIC_LIBRARIES := \ libcxcore_i \ libcxcv_i \ libcxaux_i \ libcxhighui_i \ liblapack_i \


Please help me solve this problem.

Appreciations!!

Pico