Add the flag -lstdc++fs
:
$ g++-7 test.cpp -std=c++17 -lstdc++fs
gcc 7.2 supports C++17 experimental filesystem
namespace only. I do not know, maybe gcc 7.3 supports std filesystem
namespace already.
More Related Contents:
- experimental::filesystem linker error
- How do inline variables work?
- How exactly does __attribute__((constructor)) work?
- How to enable C++17 compiling in Visual Studio?
- Why does integer overflow on x86 with GCC cause an infinite loop?
- Capturing function exit time with __gnu_mcount_nc
- Why is my program slow when looping over exactly 8192 elements?
- C++ syntax for explicit specialization of a template function in a template class?
- Error “undefined reference to ‘std::cout'”
- constexpr if and static_assert
- How to compile for Windows on Linux with gcc/g++?
- std::stoi doesn’t exist in g++ 4.6.1 on MinGW
- Why does gcc compiler output pow(10,2) as 99 not 100? [duplicate]
- When and how to use GCC’s stack protection feature?
- Search a vector of objects by object attribute
- std::ignore with structured bindings?
- undefined reference to `__stack_chk_fail’
- How to link using GCC without -l nor hardcoding path for a library that does not follow the libNAME.so naming convention?
- Is RVO (Return Value Optimization) applicable for all objects?
- Why is std::iterator deprecated?
- Linking problems due to symbols with abi::cxx11?
- RDRAND and RDSEED intrinsics on various compilers?
- How to enable experimental C++11 concurrency features in MinGW?
- C++ : friend declaration ‘declares a non-template function
- Can I link a plain file into my executable? [duplicate]
- What is “strip” (GCC application) used for?
- What does -fPIC mean when building a shared library?
- Static and Dynamic/Shared Linking with MinGW
- Difference between regex_match and regex_search?
- Why does sqrt() work fine on an int variable if it is not defined for an int?