Re: [boost] [Filesystem] Linking problem with 1_46_1

Max Moorkamp wrote:
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 had some issues in my early attempts. My problem was with my libs location, then I installed this way:
- $ ./bootstrap.sh --with-toolset=gcc --prefix=/usr/local --includedir=/usr/include --libdir=/usr/lib --with-libraries=system,date_time,thread,filesystem - $ ./bjam - # ./bjam install
Before to do it even linking lboost_system and lboost_filesystem didn't work. Thanks for that. However, the linker does find the boost_filesystem library. If I just do
g++ test.cpp -lboost_system then I get some additional linker errors /tmp/cc10fHYI.o: In function `boost::filesystem3::path::codecvt()': test.cpp:(.text._ZN5boost11filesystem34path7codecvtEv[boost::filesystem3::path::codecvt()]+0x5): undefined reference to `boost::filesystem3::path::wchar_t_codecvt_facet()' /tmp/cc10fHYI.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 so it seems that in the version I have just boost::filesystem3::detail::copy_file(boost::filesystem3::path const&, boost::filesystem3::path const&, boost::filesystem3::copy_option::enum_t, boost::system::error_code*)' is missing. Actually I just found one clue. If I do nm -Ca /usr/local/lib/libboost_filesystem.so | grep boost::filesystem3::detail::copy_file I get boost::filesystem3::detail::copy_file(boost::filesystem3::path const&, boost::filesystem3::path const&, boost::filesystem3::copy_option::enum_type, boost::system::error_code*) so the library uses boost::filesystem3::copy_option::enum_type, while the linker is looking for boost::filesystem3::copy_option::enum_t. This must have something to do with some preprocessor macro, but I can't figure out which one and why. Regards Max -- Max Moorkamp IFM-GEOMAR Wischhofstr. 1-3 24148 Kiel Tel.: Germany - 431 - 600 2570 FAX.: Germany - 431 - 600 2915
participants (1)
-
Max Moorkamp