Can't get RQuantLib working with brew installed quantlib under osx 10.9.4

余生颓废 提交于 2019-12-10 15:43:33

问题


I've been trying to install RQuantLib package via

install.packages("RQuantLib")

It keeps giving me the following errors

* 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’

I've already done

brew install boost
brew install quantlib

and I've checked the sym links for both, which should be fine (done unlink/link for both).


SOLUTION :

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/")

回答1:


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)$ 

or look at the help for install.packages() where you can pass arguments to configure as well -- I find the first method easier.

In essence, it seems that we need to help configure find your Boost headers (and then probably also the library).



来源:https://stackoverflow.com/questions/26244606/cant-get-rquantlib-working-with-brew-installed-quantlib-under-osx-10-9-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!