My code is currently using boost filesystem library. It can be compiled with the command
g++ program.cc -o program -std=c++11 -I /tools/boost/1.64/3/linux64/rel/include/ -L/tools/boost/1.64/3/linux64/rel/lib -lboost_filesystem -lboost_system
However, it fails in the linking stage with errors similar to
/tools/boost/1.64/3/linux64/rel/lib/libboost_filesystem.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
Any suggestions on why this is happening?