[Boost-bugs] [Boost C++ Libraries] #8634: boost/filesystem/path.hpp is not self-sufficient

Subject: [Boost-bugs] [Boost C++ Libraries] #8634: boost/filesystem/path.hpp is not self-sufficient
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-30 13:39:29


#8634: boost/filesystem/path.hpp is not self-sufficient
-----------------------------------------------------+----------------------
 Reporter: Valentin Shtronda <valiko.ua@…> | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
-----------------------------------------------------+----------------------
 The following code is compiled under VC2012:

 {{{
 #include <boost/filesystem.hpp>
 boost::filesystem::path p("file.txt");
 size_t hash = boost::filesystem::hash_value(p);
 }}}

 but gives link error:

 {{{
 error LNK2019: unresolved external symbol "void __cdecl
 boost::hash_combine<wchar_t>(unsigned int &,wchar_t const &)"
 (??$hash_combine@_W_at_boost@@YAXAAIAB_W_at_Z) referenced in function "unsigned
 int __cdecl boost::filesystem::hash_value(class boost::filesystem::path
 const &)" (?hash_value_at_filesystem@boost@@YAIABVpath_at_12@@Z)
 }}}

 I fixed it by replacing

 {{{
 #include <boost/functional/hash_fwd.hpp>
 }}}

 with

 {{{
 #include <boost/functional/hash.hpp>
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8634>
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:50:13 UTC