c++ - 如何在 Linux 中安装仅 header (odeint) 库?

标签 c++ linux boost g++ odeint

我在 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/

相关文章:

c++ - std::unordered_map<Foo, Bar> 测试特定的 Foo 键是否存在

java - 是否有等同于 Java <?在 C++ 中扩展 ClassName>?

linux - 如何将 "which somemodule"的输出路径作为 "ls"的参数?

linux - 如何检查 ubifs 文件系统?

c++ - 何时捕获 boost::bad lexical_cast

c++ - Boost::filesystem::is_empty() 为符号链接(symbolic link)返回 false

c++ - 我可以在 uclibc linux 上使用 boost 吗?

c++ - 当我定义一个指向类的指针时,错误 :expected constructor, 析构函数,或者在 '*' token 发生之前进行类型转换

c++ - Python:将 unicode 字符串传递给 C++ 模块

c - 实现 4.1.2 及更早版本的 GCC cas 功能