我在 Debian Sqeeze 下使用 g++ 4.4,并且安装了 boost。我能够运行一个简单的 boost 矩阵 example带标题:
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
但我还想添加 odeint
header :
#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 库
apt-get install libboost1.42-dev
其中不包含 odeint
。然后我安装了boost_1_54_0.tar.bz2. ,其中已经包含 odeint。现在我可以运行 odeint 程序,例如this .
关于c++ - 如何在 Linux 中安装仅 header (odeint) 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18300059/