Error: # error PCL requires C++ 14 or above

I’m compiling NDT_ When using the OMP function package, an error was reported: error PCL requires C + + 14 or above, and a bunch of errors were reported later. At first, I thought it was a problem with the PCL version. Later, I turned to other bloggers’ blogs and found that CMakeLists.txt Add the following code to compile

    ADD_COMPILE_OPTIONS(-std=c++11 )
    ADD_COMPILE_OPTIONS(-std=c++14 )
    set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
    or do not specify that cmkae compile with c++11 features, etc. can be compiled successfully.

Read More: