[Rcpp-devel] Where is R.h and the other header files?

Jonathan Olmsted jpolmsted at gmail.com
Mon Aug 27 00:42:20 CEST 2012


Liu,

A couple of initial reactions. The location of the R.h header is platform
dependent. On what platform are you working? You can always just paste the
output of the R function "sessionInfo()".

Next, the Rcpp team strongly recommends using an "inline"-based approach
where possible and an R package when that isn't possible. Those two
approaches take care of the file/directoy linker flags for you.

JPO


-------------------------------------------------------------------------
J. P. Olmsted

j.p.olmsted at rochester.edu
j.p.olmsted at gmail.com

http://about.me/olmjo
*www.linkedin.com/in/olmjo*
-------------------------------------------------------------------------





On Sun, Aug 26, 2012 at 6:14 PM, Michael Hannon <jm_hannon at yahoo.com> wrote:

> > I'm trying to write C++ code and call it in R. But after installing the
> Rcpp
> > package in R, I cannot find where the R.h and the other header file are.
> > When writing code in eclipse, it's really annoying to deal with the
> errors
> > because of the non-existance of R.h's. Is it a built-in feature of Rcpp
> or
> > just i'm not on the right track?
>
> On my system (Fedora 17 linux), R.h is located in /usr/include, and it
> comes
> from a general R package, not one connected specifically to Rcpp:
>
>     $ locate R.h
>     ...
>     /usr/include/R/R.h
>     ...
>
>     $ rpm -q -f /usr/include/R/R.h
>     R-devel-2.15.1-1.fc17.x86_64
>
> -- Mike
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120826/a45c8422/attachment.html>


More information about the Rcpp-devel mailing list