How to build PCL for Android memo

PCL(Point Cloud Library) can use on Android, but don’t supply Android binary. So let’s build PCL using Android NDK on MacOS 10.9.4!! verrrry easy to build.

tar -jxvf android-ndk-r8c-darwin-x86.tar.bz2
cd android-ndk-r8c
cd ~work
git clone
cd pcl-superbuild
mkdir build
cd build
cmake ../
make -j4 # j4 is prallel build option

All build finish, you will find following include and library.

Next build android application(like a Google Project tango) with PCL and NDK library.

「How to build PCL for Android memo」への13件のフィードバック

  1. Tried this method with android-ndk-r8c-darwin-x86 on ubuntu 15.10 and Cmake 3.2.2 but it doesn’t work. It says that the NDK tool chain is broken and that CMAKE_C_COMPILER and CMAKE_CXX_COMPILER aren’t set although they are set correctly.

    1. Hi Ronald,
      I try on MacOS 10.9.4. I didn’t try on ubuntu 15.10. Someone else success on Ubuntu 15.10, but I don’t know on that environment.

      1. Hi Hirotakaster,

        Thanks for the quick reply!
        I managed to compile your super build with Ubuntu 15.10 and NDK r10e. I changed the toolchain-android.cmake with the one from OpenCV. Then in common.hpp(found in /Source/pcl/common/include/pcl/common/impl) I had to add the following lines:
        # include
        # define pcl_isnan(x) std::isnan(x)
        # define pcl_isfinite(x) std::isfinite(x)
        # define pcl_isinf(x) std::isinf(x)

  2. Hi, first of all thank you very much, I succeeded in compiling PCL. I wanted to ask how I can change the superbuild to be build for other architectures as well, because at the moment I am only capable running it using armeabi. The pcl_common.a throws an error when trying to compile for mips, x86 or any of the 64-bit versions.
    Sorry if its a silly question but its the first time im working with ndk. Thank you 😉

  3. Thank you for your kind help, but I wonder there is no Eigen-android, since Eigen library is necessary for the normal operating of PCL.


メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください