Skip to content Skip to sidebar Skip to footer

Issue: Running Pcl Library With Android Project

I had compiled the PCL-SuperBuild folder as these links described: Link 1: https://hcteq.wordpress.com/2014/07/14/compiling-pcl-for-android-in-windows-cmake-gui/# Link 2: http://

Solution 1:

I had fix my issue above, actually I had write the hello-pcl.ccp instead of hello-pcl.cpp.

Now, I have a build problem in PCL files. Sample:

C:\Users\M\Desktop\Android_Projects_(Master)\tango-examples-java-master\PCL\pcl-android\include\pcl-1.6\pcl\pcl_base.h
Error:(303, 40) error: use of deleted function 'boost::shared_ptr<const sensor_msgs::PointCloud2>::shared_ptr(const boost::shared_ptr<const sensor_msgs::PointCloud2>&)'
Error:(329, 39) error: use of deleted function 'boost::shared_ptr<std::vector<int> >::shared_ptr(const boost::shared_ptr<std::vector<int> >&)'
       getIndices () { return (indices_); }

and

C:\Users\M\Desktop\Android_Projects_(Master)\tango-examples-java-master\PCL\pcl-android\include\pcl-1.6\pcl\kdtree\kdtree_flann.h
Error:(386, 25) error: use of deleted function 'boost::shared_ptr<const std::vector<int> >::shared_ptr(const boost::shared_ptr<const std::vector<int> >&)'
Error:(393, 23) error: use of deleted function 'boost::shared_ptr<const pcl::PointCloud<Eigen::Matrix<float, -1, -1> > >::shared_ptr(const boost::shared_ptr<const pcl::PointCloud<Eigen::Matrix<float, -1, -1> > >&)'
         return (input_);

I don't get why it gives me errors and other warning in the library files themselves?

Thanks

EDIT I had changed my boost version to 1.55 in source folder. Also, I had changed my Android.mk to the following:

LOCAL_PATH := $(call my-dir)
PROJECT_ROOT_FROM_JNI := ../../../../..
PROJECT_ROOT:= $(LOCAL_PATH)/$(PROJECT_ROOT_FROM_JNI)

PCL_INCLUDE := $(LOCAL_PATH)/../../../../../PCL/pcl-android
BOOST_ANDROID_INCLUDE := $(LOCAL_PATH)/../../../../../PCL/boost
FLANN_INCLUDE := $(LOCAL_PATH)/../../../../../PCL/flann-android
EIGEN_INCLUDE := $(LOCAL_PATH)/../../../../../PCL/eigen
BOOST_ANDROID := $(LOCAL_PATH)/../../../../../PCL/boost-android



include$(CLEAR_VARS)# Project and linking#opencv#OPENCVROOT:= $(LOCAL_PATH)/../../../../../OpenCV-android-sdk#OPENCV_CAMERA_MODULES:=on#OPENCV_INSTALL_MODULES:=on#OPENCV_LIB_TYPE:=SHARED#include ${OPENCVROOT}/sdk/native/jni/OpenCV.mk

LOCAL_MODULE    := helloPcl

#LOCAL_SHARED_LIBRARIES := tango_client_api

LOCAL_CPP_FEATURES := rtti exceptions
LOCAL_CFLAGS    := --std=c++11 -fexceptions
#-std=gnu++11#-Werror -std=c++11

LOCAL_SRC_FILES := hello-pcl.cpp

LOCAL_ALLOW_UNDEFINED_SYMBOLS := true

LOCAL_C_INCLUDES := $(PCL_INCLUDE)/include/pcl-1.6/ \
                    $(BOOST_ANDROID_INCLUDE)/boost_1_45_0/ \
                    $(EIGEN_INCLUDE)/ \
                    $(FLANN_INCLUDE)/include/


LOCAL_LDFLAGS += -L$(PCL_INCLUDE)/lib  \
                 -L$(BOOST_ANDROID_INCLUDE)/lib \
                 -L$(FLANN_INCLUDE)/lib


LOCAL_SHARED_LIBRARIES   += pcl_common pcl_geometry pcl_search pcl_kdtree pcl_octree pcl_sample_consensus \
                            pcl_surface pcl_features pcl_filters pcl_keypoints pcl_tracking pcl_ml \
                            pcl_registration pcl_segmentation

LOCAL_SHARED_LIBRARIES   += boost_date_time boost_iostreams boost_regex boost_system \
                            boost_filesystem boost_program_options boost_signals boost_thread

LOCAL_SHARED_LIBRARIES   += flann flann_cpp

#LOCAL_CFLAGS += -mfloat-abi=softfp -mfpu=neon -march=armv7 -mthumb -O3

LOCAL_LDLIBS    := -llog -lGLESv2 -L$(BOOST_ANDROID)/lib -lboost_system
# Boost Libraries
LOCAL_LDLIBS    += -L$(BOOST_ROOT)/libs/armeabi-v7a/


# PCL Libraries
LOCAL_LDLIBS    += -L$(PCL_ROOT)/lib/ -lpcl_io -lpcl_io_ply -lpcl_common -lpcl_octree \
                                   -lstdc++ -lc -lm -llog -landroid -ldl -lGLESv2 -lEGL \
                                   -lpcl_common -lpcl_geometry -lpcl_search -lpcl_kdtree -lpcl_octree -lpcl_sample_consensus \
                                   -lpcl_surface -lpcl_features -lpcl_filters -lpcl_keypoints -lpcl_tracking -lpcl_ml \
                                   -lpcl_registration -lpcl_segmentation \
                                   -lflann -lflann_cpp

include$(BUILD_SHARED_LIBRARY)

as I said in the comment below, all problems are solved, but I have a running problem

could not load library "libflann.so" needed by "libhelloPcl.so"

Post a Comment for "Issue: Running Pcl Library With Android Project"