I try to use the new c++1z features actually on the head of development within gcc 6.0.
If I try this little example:
namespace fs = std::experimental::filesystem;
fs::path p1 = "/home/pete/checkit";
std::cout << "p1 = " << p1 << std::endl;
/opt/linux-gnu_6-20151011/bin/g++ --std=c++1z main.cpp -O2 -g -o go
/tmp/ccaGzqFO.o: In function \`std::experimental::filesystem::v1::__cxx11::path::path(char const (&) )':
/opt/linux-gnu_6-20151011/include/c++/6.0.0/experimental/bits/fs_path.h:167: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
collect2: error: ld returned 1 exit status
The Filesystem TS is nothing to do with C++1z support, it is a completely separate specification not part of the C++1z working draft. GCC's implementation (in GCC 5.3 and later) is even available in C++11 mode.
You just need to link with
-lstdc++fs to use it.
(The relevant library,
libstdc++fs.a, is a static library, so as with any static library it should come after any objects that depend on it in the linker command.)