无法在osx 10.9.4下使RQuantLib与brew安装的Quantlib一起使用 [英] Can't get RQuantLib working with brew installed quantlib under osx 10.9.4
问题描述
我一直在尝试通过以下方式安装RQuantLib软件包
I've been trying to install RQuantLib package via
install.packages("RQuantLib")
它不断给我以下错误
* installing *source* package ‘RQuantLib’ ...
** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for R... yes
checking for quantlib-config... yes
checking for Boost development files... no
configure: error: Boost development files not found
ERROR: configuration failed for package ‘RQuantLib’
* removing ‘/usr/local/Cellar/r/3.1.1/R.framework/Versions/3.1/Resources/library/RQuantLib’
我已经完成
brew install boost
brew install quantlib
并且我已经检查了两个符号链接,这应该很好(两个都完成取消链接/链接).
and I've checked the sym links for both, which should be fine (done unlink/link for both).
解决方案:
根据edd的回答使用了以下命令,对我有用
Used the command below based on edd's answer, worked for me
install.packages("RQuantLib", configure.args="--with-boost-include=/usr/local/include/ --with-boost-lib=/usr/local/lib/")
推荐答案
尝试使用
在基于*.tar.gz
文件的shell中进行操作
Try to do it either in a shell based on the *.tar.gz
file using these
edd@max:~/git/rquantlib(master)$ ./configure --help|grep boost
--with-boost-include=INCLUDE_PATH
--with-boost-lib=LIB_PATH
edd@max:~/git/rquantlib(master)$
或查看install.packages()
的帮助,您也可以在其中传递参数到configure
-我发现第一种方法更简单.
or look at the help for install.packages()
where you can pass arguments to configure
as well -- I find the first method easier.
从本质上讲,似乎我们需要帮助配置来查找Boost头(然后可能还有库).
In essence, it seems that we need to help configure find your Boost headers (and then probably also the library).
这篇关于无法在osx 10.9.4下使RQuantLib与brew安装的Quantlib一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!