在 Mac 10.12.1 上安装 RQuantlib 包

Installing RQuantlib package on Mac 10.12.1

我正在尝试从源代码安装 RQuantLib 包,已经从终端通过 brew install quantlib 安装了必需的 quantlib。

在第一次找不到 Boost 之后,然后 following this post,我尝试了:

> install.packages("RQuantLib", configure.args="--with-boost-include=/usr/local/include/ --with-boost-lib=/usr/local/lib/")

然而,这最终失败并出现以下警告/错误:

ld: 180 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RQuantLib.so] Error 1
ERROR: compilation failed for package ‘RQuantLib’

我对 clang 知之甚少,但这真的是链接器文件问题吗?

this (long) thread at the repo as well as the resulting wiki entry.

作为 (co-)author/maintainer 我没有 OS X 机器,对我来说,事情只是在 Linux 上工作 ... 安装文档其他 OSs 必须由用户贡献,幸运的是我们有一些。

解决方案(感谢上面软件包的合著者 Dirk 提供的线索)来自 this wiki entry he mentioned, in particular requiring the editing of a .hpp file as detailed on this github edit,一旦他们推出 quantlib v 1.9.1

,它似乎会自行修复