I had some difficulty today getting my code to link to boost::filesystem::copy_file() (linking to boost version 1.53.0, gcc v4.7.2), I suffered from link errors like this:
undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)’
From reading this post, it seemed that my problem may have stemmed from my use of c++0x.
None of the suggested solutions in this thread worked for me & I double checked that had built boost with -std=c++0x.
In the end after looking through the code in filesystem/operations.hpp the only thing that fixed my linking problem was to #define BOOST_NO_CXX11_SCOPED_ENUMS before including
This may well not be the best/proper way to fix the problem but it was the only thing that worked for me..