ndt_omp icon indicating copy to clipboard operation
ndt_omp copied to clipboard

error: there are no arguments to ‘omp_get_max_threads’ that depend on a template parameter

Open PenghangF opened this issue 4 years ago • 1 comments

when I catkin_make , it errors : /src/ndt_omp/include/pclomp/gicp_omp_impl.hpp:64:70: error: there are no arguments to ‘omp_get_max_threads’ that depend on a template parameter, so a declaration of ‘omp_get_max_threads’ must be available [-fpermissive] std::vector<std::vector> nn_indices_array(omp_get_max_threads()); ^

Can someone help me? Thanks a lot.

PenghangF avatar Aug 12 '21 03:08 PenghangF

I solved the problem by change something blow in CMakeLists.txt:

add_definitions(-std=c++14 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)

set(CMAKE_CXX_FLAGS "-std=c++14 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")

add_definitions(-std=c++11) set(CMAKE_CXX_FLAGS "-std=c++11 -fopenmp")

PenghangF avatar Nov 10 '21 05:11 PenghangF