Ask Your Question
0

Android undefined reference to 'cvUpdateMotionHistory' [closed]

asked 2016-05-20 05:05:14 -0600

Dany gravatar image

I am trying to use opencv source code from Windows in Android. So I want to use native C/C++ opencv code in android. I followed this tutorial to do it : http://docs.opencv.org/2.4/doc/tutori...

Everything work perfectly, except this line :

cvUpdateMotionHistory(p_silhouette, p_mhi, timestamp, MHI_DURATION);

I get this error when I run "ndk-build APP_ABI=all APP_STL=gnustl_static" :

error: undefined reference to 'cvUpdateMotionHistory'

Android.mk :

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_LIB_TYPE := STATIC
OPENCV_INSTALL_MODULES := on
OPENCV_CAMERA_MODULES := off
include D:/Resources/opencv_v310_android/sdk/native/jni/OpenCV.mk
LOCAL_MODULE := Motor
LOCAL_SRC_FILES := package_Motor.cpp
LOCAL_SRC_FILES += motor/motor.cpp
LOCAL_LDFLAGS := -llog
include $(BUILD_SHARED_LIBRARY)

Do you have any idea how to solve this problem? Thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Dany
close date 2016-05-23 02:56:02.636194

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-05-23 02:54:56 -0600

Dany gravatar image

I changed opencv version (3.1.0 to 2.4.9) and it works. Notice that I use this command to build:

ndk-build APP_ABI=all APP_STL=gnustl_static APP_CPPFLAGS=-frtti APP_CPPFLAGS+=-fexceptions APP_PLATFORM=android-17
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-20 05:05:14 -0600

Seen: 629 times

Last updated: May 20 '16