0

I was trying to build CLM for android. I create Android.mk file, while building its throws exception My android.mk file look like this

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

OPENCV_CAMERA_MODULES:=on
OPENCV_INSTALL_MODULES:=on
OPENCV_LIB_TYPE:=SHARED

include /Documents/adt-bundle-mac-x86_64-20140702/OpenCV-3.0.0-android-sdk/sdk/native/jni/OpenCV.mk

LOCAL_MODULE    := CLM

LOCAL_SRC_FILES := CCNF_patch_expert.cpp CLM_utils.cpp CLM.cpp CLMTracker.cpp DetectionValidator.cpp Patch_experts.cpp PAW.cpp PDM.cpp SVR_patch_expert.cpp

LOCAL_C_INCLUDES := /Documents/Mk/C-Projects/CLM/include\
                    /Documents/adt-bundle-mac-x86_64-20140702/OpenCV-3.0.0-android-sdk/sdk/native/jni/include\
                    /Documents/adt-bundle-mac-x86_64-20140702/OpenCV-3.0.0-android-sdk/sdk/native/jni/include/opencv\
                    /Documents/Mk/C-Projects/CLM/eigen3



LOCAL_LDLIBS     += -llog -ldl

include $(BUILD_SHARED_LIBRARY) 

Building this mk file file i got exceptions

In file included from /Documents/Mk/C-Projects/CLM/include/CLM_utils.h:9:0, from jni/CCNF_patch_expert.cpp:3: /Documents/Mk/C-Projects/CLM/include/CLM.h:170:15: error: expected ',' or '...' before '&&' token CLM(const CLM&& other) ^ /Documents/Mk/C-Projects/CLM/include/CLM.h:170:23: error: invalid constructor; you probably meant 'CLMTracker::CLM (const CLMTracker::CLM&)' CLM(const CLM&& other) ^ /Users/hubmaci7/Documents/Mourish/SWIG/C-Projects/CLM/include/CLM.h:192:28: error: expected ',' or '...' before '&&' token CLM & operator= (const CLM&& other) ^ /Documents/Mk/C-Projects/CLM/include/CLM.h: In copy constructor 'CLMTracker::CLM::CLM(const CLMTracker::CLM&)': /Users/hubmaci7/Documents/Mourish/SWIG/C-Projects/CLM/include/CLM.h:121:32: error: '>>' should be '> >' within a nested template argument list
for(std::map>::const_iterator it = other.kde_resp_precalc.begin(); it!= other.kde_resp_precalc.end(); it++) ^ /Documents/Mourish/SWIG/C-Projects/CLM/include/CLM.h:124:60: error: '>>' should be '> >' within a nested template argument list this->kde_resp_precalc.insert(std::pair>(it->first, it->second.clone())); ^ /Documents/Mk/C-Projects/CLM/include/CLM.h: In member function 'CLMTracker::CLM& CLMTracker::CLM::operator=(const CLMTracker::CLM&)': /Documents/Mk/C-Projects/CLM/include/CLM.h:158:33: error: '>>' should be '> >' within a nested template argument list for(std::map>::const_iterator it = other.kde_resp_precalc.begin(); it!= other.kde_resp_precalc.end(); it++)

Please help me to find right solution to build clm for android

sikan
  • 76
  • 9

1 Answers1

0

I got answer to Build CLM in android using Androidndk. In Application.mk file i did mistake i didnt add CPP_FLAGS -std=c++11.

My Application.mk file look like this

APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions -std=c++11

APP_ABI := armeabi-v7a
APP_PLATFORM := android-9

Finally i build so generation for CLM

sikan
  • 76
  • 9