c – Boost过程中缺少异常

我想使用Boost Process,尽管还没有发布.我做到了
svn co svn://svn.boost.org/svn/boost/sandBox/process/ boost-process

添加了boost-process以包含路径(-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隐藏了吗?

解决方法

您需要编辑进程/ operations.hpp以删除它:
#include <boost/filesystem/path.hpp>

而是这样说:

#include <boost/filesystem/operations.hpp>

我认为这将使它与Boost Filesystem v3(很快将成为Boost 1.48的唯一版本)兼容.

相关文章

本程序的编译和运行环境如下(如果有运行方面的问题欢迎在评...
水了一学期的院选修,万万没想到期末考试还有比较硬核的编程...
补充一下,先前文章末尾给出的下载链接的完整代码含有部分C&...
思路如标题所说采用模N取余法,难点是这个除法过程如何实现。...
本篇博客有更新!!!更新后效果图如下: 文章末尾的完整代码...
刚开始学习模块化程序设计时,估计大家都被形参和实参搞迷糊...