0

I am implementing a SLAM-algorithm in Visual Studio 2019 where I want to use the ICP algorithm from the MRPT library for scan-matching. I have therefore downloaded and compiled the source code using CMake, and added it as an external dependency.

The code is pretty much the same as the first example here, with (I believe) all necessary headers included.

My project is written in C++17, but it seems that MRPT library is not, as I get these errors:

C:\Program Files (x86)\mrpt-1.5.7\libs\opengl\include\mrpt\opengl\COpenGLScene.h(195,27): error C2039: 'bind2nd': is not a member of 'std'
C:\Program Files (x86)\mrpt-1.5.7\libs\base\include\mrpt\random\RandomGenerators.h(292,12): error C2039: 'random_shuffle': is not a member of 'std'
C:\Program Files (x86)\mrpt-1.5.7\libs\bayes\include\mrpt\bayes\CKalmanFilterCapable_impl.h(396,8): error C3861: 'bind1st': identifier not found

A quick search revealed that these functions random_shuffle, bind1st, bind2nd are removed in C++17.

Does this mean that I have to manually edit these files to work with C++17, or is there any quick fix solutions for this? For instance so that the external library is compiled with a supported version of C++ instead of C++17?

mullinsen
  • 1
  • 1
  • It looks like you would have to use the development version 2.0 of MRPT with c++17. But I have not been there so... – lakeweb Mar 06 '20 at 16:24
  • Note that the errors occur in .h files, which presumably are included in your .cpp files. Hence, they are necessarily compiled using the same C++17 compiler as your code. – MSalters Mar 06 '20 at 16:45

0 Answers0