undefined reference to `std::filesystem::__cxx11

Viewed 200

My gcc version is 9.4.0, Clang 7.0.1 and C++17.

#include <filesystem>

namespace fs = std::filesystem;

int main()
{
  auto const path_of_friend = fs::absolute( "path/friend" );
}

And I am getting the error "undefined reference to `std::filesystem::absolute". What must I do?

0 Answers
Related