Ask Your Question
0

use opencv as static library

asked 2013-05-07 07:25:21 -0600

Lee gravatar image

Hi, I'm trying to use opencv library as static OPENCV_LIB_TYPE:=STATIC, but i always get this error:

E:\android-ndk-r8\ndk-build.cmd all 
Android NDK: Trying to define local module 'opencv_contrib' in jni/Android.mk.    
E:/android-ndk-r8/build/core/build-module.mk:34: *** Android NDK: Aborting.    .  Stop.
Android NDK: But this module was already defined by jni/Android.mk.
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-07 08:21:43 -0600

It looks like you try to build two OpenCV-based native libs using single Android.mk. This known issue had been fixed at OpenCV 2.4.4 release. You need to update OpenCV4Android SDK or add OPENCV_INSTALL_MODULES:=off line before the second inclusion of opencv.mk, if you want to use your version. See the issue and related pull request for more details.

edit flag offensive delete link more

Comments

1

thank you i'll give it a try

Lee gravatar imageLee ( 2013-05-07 09:01:45 -0600 )edit

Now i 'm using opencv2.4.5,so that i don't have problems with OPENCV_LIB_TYPE:=STATIC.But i still can't link opencv library to my project.PS: my project use another library and i want to link the two librairies to be used in the same file.Do you have any idea how to do that?

Lee gravatar imageLee ( 2013-05-08 08:05:39 -0600 )edit

Question Tools

Stats

Asked: 2013-05-07 07:25:21 -0600

Seen: 1,173 times

Last updated: May 07 '13