2013-03-05 138 views
0

我試圖從編譯如下github上的位置的代碼,並得到一個錯誤大加讚賞C++編譯錯誤

Github上項目的任何幫助https://github.com/aranetic/process-pst

錯誤是

~/process-pst (master ✘)✭ ᐅ make 
[ 7%] Building CXX object CMakeFiles/ProcessPstLib.dir/edrm.cpp.o 
/Users/gwest/process-pst/edrm.cpp: In function 'void<unnamed>::output_file(edrm_context&,  const std::wstring&, const std::wstring&, const std::vector<unsigned char, std::allocator<unsigned char> >&)': 
/Users/gwest/process-pst/edrm.cpp:177: error: 'class boost::filesystem::path' has no  member named 'file_string' 
make[2]: *** [CMakeFiles/ProcessPstLib.dir/edrm.cpp.o] Error 1 
make[1]: *** [CMakeFiles/ProcessPstLib.dir/all] Error 2 
make: *** [all] Error 2 

謝謝

回答

2

從你可以看到在boost/filesystem/path.hpp

# if defined(BOOST_FILESYSTEM_DEPRECATED) 
    // deprecated functions with enough signature or semantic changes that they are 
    // not supplied by default 
    const std::string file_string() const    { return string(); } 

    // ... 

# endif 

file_string()是「默認情況下不提供」。所以,你有三種選擇:

  1. 重新編譯的提升而不BOOST_FILESYSTEM_DEPRECATED標誌
  2. 使用舊的Boost庫。
  3. 正在嘗試編譯的正確源代碼。
+1

該項目的最後一次提交是3年前,所以存在這個問題。 – adrianp 2013-03-05 11:56:37