Nor*_*löw 6 c++ exception-handling process-control boost-filesystem
我想使用Boost Process,尽管还没有发布.我做到了
svn co svn://svn.boost.org/svn/boost/sandbox/process/ boost-process
添加boost-process到包含path(-I),#included <boost/process.hpp>但编译抱怨filesystem_error没有定义:
boost-process/boost/process/operations.hpp: In function ‘std::string boost::process::find_executable_in_path(const string&, std::string)’:
boost-process/boost/process/operations.hpp:85:36: error: ‘filesystem_error’ is not a member of ‘boost::filesystem3’
In file included from boost-process/boost/process.hpp:42:0,
                 from tests/../fio.hpp:22,
                 from tests/t_histogram.cpp:18:
boost-process/boost/process/operations.hpp:130:32: error: ‘filesystem_error’ is not a member of ‘boost::filesystem3’
我尝试将名称空间更改为boost::filesystem3但结果相同.
定义filesystem_error是
  class BOOST_SYMBOL_VISIBLE filesystem_error : public system::system_error
被BOOST_SYMBOL_VISIBLE隐藏呢?
Joh*_*nck 13
您需要编辑进程/ operations.hpp以删除它:
#include <boost/filesystem/path.hpp> 
而是这样说:
#include <boost/filesystem/operations.hpp>
我认为这将使它与Boost Filesystem v3(很快将成为Boost 1.48的唯一版本)兼容.
我通过在 g++ 命令行上传递 -DBOOST_FILESYSTEM_VERSION=2 来修复此问题。
| 归档时间: | 
 | 
| 查看次数: | 2255 次 | 
| 最近记录: |