Question

Hi i'm trying to compile and run simple RInside examples on mac osx. I'm using R installed form macports and RInside installed via R as well with the latest release of all libraries heres my R information

R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin11.4.0/x86_64 (64-bit)

heres how I try to compile an example

 g++-mp-4.7 -I/opt/local/lib/R/library/RInside/include/
    -I/opt/local/lib/R/library/Rcpp/include/ -I/opt/local/lib/R/include/ -L/opt/local/lib/R/library/RInside/libs/ -L/opt/local/lib/R/library/Rcpp/libs/ -lRInside -lRcpp test.cpp -o test

and heres my error

In file included from /opt/local/lib/R/library/Rcpp/include/RcppCommon.h:155:0,
                 from /opt/local/lib/R/library/Rcpp/include/Rcpp.h:27,
                 from /opt/local/lib/R/library/RInside/include/RInsideCommon.h:31,
                 from /opt/local/lib/R/library/RInside/include/RInside.h:26,
                 from thread_safe_test.cpp:5:
/opt/local/lib/R/include/R.h:34:21: fatal error: Rconfig.h: No such file or directory
compilation terminated.

Any suggestions

Was it helpful?

Solution

As I recall, you maty have to compile RInside from source on OS X. Try the archives of the rcpp-devel list for more.

OTHER TIPS

Why don't you use the version from r-project.org and download the compilers etc. from http://r.research.att.com/tools/? That's the preferred method I think. For me this approach works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top