[Rcpp-devel] Advice on making interface into existing C++ library

Jeffrey Wong jeff.ct.wong at gmail.com
Tue Jan 13 17:51:02 CET 2015


Thanks Dirk, would I still create a rcpp skeleton package and dump the
*.cpp files into src, then just use Rcpp::export? What about all the .h
files in that library?

Thanks

On Tuesday, January 13, 2015, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 13 January 2015 at 00:16, Jeffrey Wong wrote:
> | Hello,
> |
> | I am very interested in making libFM accessible through R via Rcpp
> |
> | https://github.com/srendle/libfm
> |
> | The makefile for libFM will compile the libFM.cpp file in the src/libFM
> | directory and dump the result in a bin/ directory, which is normally
> accessed
> | through command line.  What would be the best way for making this
> accessible
> | through Rcpp?
>
> I'd start with the src/libfm/Makefile, see what it compiles into libfm (ie
> *.cpp and tools/{transpose,convert.cpp}) and just copy that to src/ of your
> package.  R takes care of the rest.
>
> Working with an external library is doable but harder.  Other R packages do
> it, can't think of an Rcpp-using package that does though.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
> <javascript:;>
>


-- 
Jeffrey Wong
My portfolio: http://jeffreycwong.com <http://jeffreyctwong.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150113/835c304f/attachment.html>


More information about the Rcpp-devel mailing list