我想使用Boost进程,尽管它还没有发布。我做到了
svn co svn://svn.boost.org/svn/boost/sandbox/process/ boost-process添加了包含路径(-I)和#included <boost/process.hpp>的boost-process,但编译报告未定义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藏起来了?
发布于 2012-03-21 08:10:04
您需要编辑process/operations.hpp以删除以下内容:
#include <boost/filesystem/path.hpp> 取而代之的是:
#include <boost/filesystem/operations.hpp>我认为这将使它与Boost Filesystem v3 (很快将是唯一的版本,计划在Boost1.48中)兼容。
发布于 2012-03-21 08:01:02
我通过在g++命令行中传递-DBOOST_FILESYSTEM_VERSION=2修复了这个问题。
https://stackoverflow.com/questions/8926715
复制相似问题