Boost logo

Boost Users :

From: Lennart Wagner (lwagner_at_[hidden])
Date: 2007-12-09 10:34:59


Hi,

I am using boost v1.34.1 and the "current" version of mingw. I got a
problem (and solution) with the filesystem library: If the file
convenience.hpp is included multiple times, mingw/gcc says:

In function
`ZN5boost10filesystem9extensionERKNS0_10basic_pathISsNS0_11path_traitsEEE':C:/Daten/Programme/Dev/boost_1_34_1/include/boost/filesystem/convenience.hpp:58:
multiple definition of
`boost::filesystem::extension(boost::filesystem::basic_path const&)'
obj\Debug\Source\global.o:C:/Daten/Programme/Dev/boost_1_34_1/include/boost/filesystem/convenience.hpp:58:
first defined here

I can solve that (at least for me), if line 31 in convenience.hpp
# define BOOST_FS_FUNC_STRING std::string

is changed to
# define BOOST_FS_FUNC_STRING inline std::string

Another change I did to avoid an anoying warning is in line 45

boost::throw_exception( basic_filesystem_error<Path>(
        "boost::filesystem::create_directories", ph, -1 ) );

I changed the third parameter to 0, since it is unsigned.

Have a nice day,
Lennart


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net