Re: [Rcpp-devel] Loading Rcpp modules from dynamic library

2012-02-27 Thread Michael Braun
Romain: Thanks for your helpful response. This works perfectly. Michael On Feb 26, 2012, at 8:50 AM, wrote: > hello, > > You can grab the result of dyn.load and use it as the PACKAGE argument of > Module. > > Romain > > > Le 26 févr. 2012 à 01:11, Michael Braun a écrit : > >> No,

Re: [Rcpp-devel] Loading Rcpp modules from dynamic library

2012-02-26 Thread Dirk Eddelbuettel
On 26 February 2012 at 14:50, rom...@r-enthusiasts.com wrote: | You can grab the result of dyn.load and use it as the PACKAGE argument of Module. While we continued to recommend using a package, I have now documented this in a short paragraph I just added at the end of the Rcpp-modules vignette

Re: [Rcpp-devel] Loading Rcpp modules from dynamic library

2012-02-26 Thread romain
hello, You can grab the result of dyn.load and use it as the PACKAGE argument of Module. Romain Le 26 févr. 2012 à 01:11, Michael Braun a écrit : > No, what I would like to do is access an Rcpp module from a dynamic library > that is not part of a R package (e.g., loaded using dyn.load()

Re: [Rcpp-devel] Loading Rcpp modules from dynamic library

2012-02-25 Thread Michael Braun
No, what I would like to do is access an Rcpp module from a dynamic library that is not part of a R package (e.g., loaded using dyn.load() ). If I put the code in a package, there is no problem. But what I am getting is: > library(Rcpp) > dyn.load("add.so") > mod=Module("adding") > add=new(mod

Re: [Rcpp-devel] Loading Rcpp modules from dynamic library

2012-02-25 Thread Dirk Eddelbuettel
Hi Michael, On 25 February 2012 at 19:45, Michael Braun wrote: | Hi. I would like to start using Rcpp modules in my code, but I am having some | trouble loading them into R. Here is an example: My personal approach is to follow the path of least resistance on __start from an existing package__

[Rcpp-devel] Loading Rcpp modules from dynamic library

2012-02-25 Thread Michael Braun
Hi. I would like to start using Rcpp modules in my code, but I am having some trouble loading them into R. Here is an example: #include template class adding { public: const T a, b; adding(const T&, const T&); T add2(); }; template adding::adding(const T& a_, const T& b_) : a(a_), b