boost/math/common_factor.hpp
does not seem to be part of BH, so item 4 can be ruled out. If you have boost headers installed in /opt/local/include
, for item 3, you can do something like this perhaps:
PKG_CXXFLAGS += -I/opt/local/include
Question
I'm trying to use Boost together with Rcpp as in this example by Dirk Eddelbuettel. I cannot, however, compile this example as I get
"fatal error: 'boost/math/common_factor.hpp' file not found".
I have looked at this question and done item 1 and 2 in the list of suggestions by Dirk. Especially, when doing 1 it seems that I can build a C++ program utilizing the boost library. Furthermore, on my MacBook it seems like Boost is located in the directory /opt/local/include/
.
Regarding number 3 in the list of suggestions it is not clear to me what exactly to put in the makevars file though. Any Ideas?
Adam
Solution
boost/math/common_factor.hpp
does not seem to be part of BH, so item 4 can be ruled out. If you have boost headers installed in /opt/local/include
, for item 3, you can do something like this perhaps:
PKG_CXXFLAGS += -I/opt/local/include
OTHER TIPS
If you have difficulties instructing the compiler to find a complete Boost installation, you could always switch to another example from the Rcpp Gallery as eg
both of which should work with a // [[Rcpp::depends(BH)]]
.