Skip to content

MacOS: Build Error: no member named 'filesystem' in namespace 'boost' #54

@farhanhubble

Description

@farhanhubble

I'm following the steps given for MacOS and ran into a compilation error on the make step.

[ 25%] Building CXX object CMakeFiles/environment.dir/src/environment.cpp.o
In file included from /Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/environment.cpp:7:
/Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/processPointClouds.h:47:17: error: no member named 'filesystem' in namespace 'boost'; did you mean 'std::__fs::filesystem'?
    std::vector<boost::filesystem::path> streamPcd(std::string dataPath);
                ^~~~~~~~~~~~~~~~~
                std::__fs::filesystem
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/u8path.h:32:1: note: 'std::__fs::filesystem' declared here
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__config:724:62: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM'
      _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
                                                             ^
In file included from /Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/environment.cpp:9:
/Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/processPointClouds.cpp:132:13: error: no member named 'filesystem' in namespace 'boost'; did you mean 'std::__fs::filesystem'?
std::vector<boost::filesystem::path> ProcessPointClouds<PointT>::streamPcd(std::string dataPath)
            ^~~~~~~~~~~~~~~~~
            std::__fs::filesystem
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/u8path.h:32:1: note: 'std::__fs::filesystem' declared here
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__config:724:62: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM'
      _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
                                                             ^
In file included from /Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/environment.cpp:9:
/Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/processPointClouds.cpp:135:17: error: no member named 'filesystem' in namespace 'boost'; did you mean 'std::__fs::filesystem'?
    std::vector<boost::filesystem::path> paths(boost::filesystem::directory_iterator{dataPath}, boost::filesystem::directory_iterator{});
                ^~~~~~~~~~~~~~~~~
                std::__fs::filesystem
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/u8path.h:32:1: note: 'std::__fs::filesystem' declared here
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__config:724:62: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM'
      _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
                                                             ^
In file included from /Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/environment.cpp:9:
/Users/farhan/devel/udacity/SFND_Lidar_Obstacle_Detection/src/processPointClouds.cpp:135:48: error: no member named 'filesystem' in namespace 'boost'; did you mean 'std::__fs::filesystem'?
    std::vector<boost::filesystem::path> paths(boost::filesystem::directory_iterator{dataPath}, boost::filesystem::directory_iterator{});
                                               ^~~~~~~~~~~~~~~~~
                                               std::__fs::filesystem
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/u8path.h:32:1: note: 'std::__fs::filesystem' declared here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions