error: no member named 'isnan' in namespace 'std' using std::isnan;

I am compiling a Point Cloud Library project on Mac and I get the following error:

/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;

Here are the exact steps I have taken to compile the project

$> brew update
$> brew tap brewsci/science
$> brew options pcl
$> brew install pcl
$> cd ~
$> git clone https://github.com/udacity/SFND_Lidar_Obstacle_Detection.git
$> cd SFND_Lidar_Obstacle_Detection
$> mkdir build && cd build
$> cmake ..
$> make

I tried changing the file given in that address from include to include but it wouldn't allow me because the file is read only. Here is my CMakeLists.txt

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

add_definitions(-std=c++17)

set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")

project(playback)

find_package(PCL 1.2 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")


add_executable (environment src/environment.cpp src/render/render.cpp src/processPointClouds.cpp)
target_link_libraries (environment ${PCL_LIBRARIES})

I have tried compiling with clang++ and g++ but didn't see any difference!

1 answer

  • answered 2019-08-15 22:01 Reza Afra

    Here are the exact steps I have taken to compile the project

    $> brew update
    $> brew tap brewsci/science
    $> brew options pcl
    $> brew install pcl
    $> cd ~
    $> git clone https://github.com/udacity/SFND_Lidar_Obstacle_Detection.git
    $> cd SFND_Lidar_Obstacle_Detection
    $> mkdir build && cd build
    $> cmake ..
    $> make