Boost logo

Boost :

Subject: [boost] [Filesystem] Linking problem with 1_46_1
From: Max Moorkamp (mmoorkamp_at_[hidden])
Date: 2011-04-04 08:29:57


I have recently upgraded to boost 1_46_1 and since then I am experience
linking problems with the filesystem library.

I have performed a standard install using ./; bjam; bjam
install under Ubuntu 10.04 with the default gcc (4.4.3).
I can boil the problem down to this test program:

#include <boost/filesystem.hpp>

int main()
  boost::filesystem::copy_file("a", "b");

compiling this with

g++ test.cpp -lboost_system -lboost_filesystem

results in this error message

/tmp/ccBuSw7s.o: In function
`boost::filesystem3::copy_file(boost::filesystem3::path const&,
boost::filesystem3::path const&)':
const&, boost::filesystem3::path const&)]+0x2a): undefined reference to
`boost::filesystem3::detail::copy_file(boost::filesystem3::path const&,
boost::filesystem3::path const&,
boost::filesystem3::copy_option::enum_t, boost::system::error_code*)'
collect2: ld returned 1 exit status

I had a look at this thread

but adding or removing -std=c++0x does not change anything. I also tried
to see whether any special compiler options were used during the build
of boost, so here is the line for operations.hpp

     "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline
-DNDEBUG -I"." -c -o

There is nothing there that strikes me as special, any ideas anyone.



Max Moorkamp
Wischhofstr. 1-3
24148 Kiel
Tel.: Germany - 431 - 600 2570
FAX.: Germany - 431 - 600 2915

Boost list run by bdawes at, gregod at, cpdaniel at, john at