|
Boost : |
Subject: [boost] [Filesystem] Linking problem with 1_46_1
From: Max Moorkamp (mmoorkamp_at_[hidden])
Date: 2011-04-04 08:29:57
Hi,
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 ./bootstrap.sh; 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>
#define BOOST_FILESYSTEM_VERSION 3
#define BOOST_FILESYSTEM_NO_DEPRECATED
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&)':
test.cpp:(.text._ZN5boost11filesystem39copy_fileERKNS0_4pathES3_[boost::filesystem3::copy_file(boost::filesystem3::path
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
http://boost.2283326.n4.nabble.com/Filesystem-problems-with-g-std-c-0x-td2639716.html
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
-Wall -pthread -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG -I"." -c -o
"bin.v2/libs/filesystem/build/gcc-4.4.3/release/link-static/threading-multi/v3/src/operations.o"
"libs/filesystem/v3/src/operations.cpp"
There is nothing there that strikes me as special, any ideas anyone.
Regards
Max
-- Max Moorkamp IFM-GEOMAR Wischhofstr. 1-3 24148 Kiel Tel.: Germany - 431 - 600 2570 FAX.: Germany - 431 - 600 2915
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk