Re: [Rd] Rcpp, best method for linking to

From: Andrew Finley <afinley_at_stat.umn.edu>
Date: Fri 24 Feb 2006 - 22:03:10 GMT

Hi Andy,
Follow the suggestions for c++ in the Writing R Extensions document.
Wrap your c++ code in extern "C"{}, include your classes in the includes (e.g., #include "myclass.h") and put the myclass.h and myclass.cpp in the src directory along with your other code. Then R CMD build ... and R CMD INSTALL ... This works for me.
-Andy

On Fri, 2006-02-24 at 13:11 -0800, Andrew Garbutt wrote:
> Dear all,
>
>
>
> After a bit of reading I came across the Rcpp example package. There
> are a few classes that I would like to use and I am not sure how best to
> include them in my own package. Is it best to compile it as an
> independent library and link to it? Or is there some way to `require` it
> for my own package? Re-write using the code as an example (unsure how

> best to do this at this moment, as the Rcpp package is licensed under
> the GPL v2 and I am unsure of the license that I wish to use for my own
> package.) Any thoughts or ideas would be appreciated.
>
>
>
> Thanks,
>
> Andy
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Research Fellow
Department of Forest Resources
University of Minnesota
Office: 305 Green Hall
Phone: (612) 624-1714
Fax: (612) 625-5212
web: http://blue.fr.umn.edu

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat Feb 25 09:10:19 2006

This archive was generated by hypermail 2.1.8 : Sat 25 Feb 2006 - 01:15:56 GMT