[Boost-bugs] [Boost C++ Libraries] #995: 'multiply defined symbols' when including <boost/filesystem.hpp> in different source files

Subject: [Boost-bugs] [Boost C++ Libraries] #995: 'multiply defined symbols' when including <boost/filesystem.hpp> in different source files
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-05-25 08:03:53


#995: 'multiply defined symbols' when including <boost/filesystem.hpp> in
different source files
------------------------+---------------------------------------------------
 Reporter: anonymous | Type: Bugs
   Status: new | Milestone:
Component: filesystem | Version: release 1.34.0
 Severity: Problem | Keywords:
------------------------+---------------------------------------------------
 When <boost/filesystem.hpp> is included in different source files, the
 linker complains about 'multiply defined symbols'

 Attached: two source files that reproduce the error when compiled and
 linked in the same project.

 boost-1.34.0
 MSVC 7.0

 {{{
 test2.obj : error LNK2005: "class std::basic_string<char,struct
 std::char_traits<char>,class std::allocator<char> > __cdecl
 boost::filesystem::extension(class boost::filesystem::basic_path<class
 std::basic_string<char,struct std::char_traits<char>,class
 std::allocator<char> >,struct boost::filesystem::path_traits> const &)"
 (?extension_at_filesystem@boost@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@ABV?$basic_path_at_V?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@Upath_traits_at_filesystem@boost@@@12@@Z)
 already defined in test.obj
 test2.obj : error LNK2005: "class std::basic_string<char,struct
 std::char_traits<char>,class std::allocator<char> > __cdecl
 boost::filesystem::basename(class boost::filesystem::basic_path<class
 std::basic_string<char,struct std::char_traits<char>,class
 std::allocator<char> >,struct boost::filesystem::path_traits> const &)"
 (?basename_at_filesystem@boost@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@ABV?$basic_path_at_V?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@Upath_traits_at_filesystem@boost@@@12@@Z)
 already defined in test.obj
 Release/test.exe : fatal error LNK1169: one or more multiply defined
 symbols found
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/995>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:55 UTC