문제

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

도움이 되었습니까?

해결책

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

다른 팁

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)]].

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top