【发布时间】:2013-08-18 14:21:52
【问题描述】:
我在 Debian Sqeeze 下使用 g++ 4.4,并且安装了 boost。我可以运行带有标题的简单提升矩阵example:
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
但我还想添加 odeint 标头:
#include <boost/numeric/odeint.hpp>
但是,这是不可能的,因为我的 /usr/include/boost/numeric 文件夹只列出了
conversion interval interval.hpp ublas
如何安装odeint?
odeint 是一个只有头文件的库,不需要链接到预编译的代码。我已经下载了.tar 并将odeint 文件夹和odeint.hpp 文件复制到我的/usr/include/boost/numeric 文件夹中。但是,它不起作用。编译时出现错误:
error: boost/range/algorithm/copy.hpp: No such file
【问题讨论】:
-
你安装了 boost::range 吗?它可以很好地找到 odeint 标头,但其中一个包含范围库中不存在的标头。
-
@deong:谢谢,提升/范围/算法丢失。可能是因为我将 boost 安装为 debian 打包而不是 boost_1_54_0.tar.bz2.。现在我安装了 boost_1_54_0.tar.bz2,一切正常,因为 odeint 包含在这个发行版中。
标签: c++ linux boost g++ odeint