Monday, September 24, 2012

OpenCV + PCL = FLANN conflicts?

When we try to integrate the PCL and OpenCV library, often times you will run into this problem:
../../pcl-superbuild/build/CMakeExternals/Install/flann-android/include/flann/util/saving.h:113: error: reference to 'flann' is ambiguous../../pcl-superbuild/build/CMakeExternals/Install/flann-android/include/flann/defines.h:76: error: candidates are: namespace flann { }../../OpenCV-2.4.2-android-sdk/sdk/native/jni/include/opencv2/flann/miniflann.hpp:55: error:                 namespace cv::flann { }

The solution to this is simple. Take away the namespace will do the trick.

using namespace cv;
using namespace pcl;

Of course, then you have to add cv:: and pcl:: too the rest of your code, but it is simple.

No comments:

Post a Comment