Skip to content
Prev 3515 / 10988 Next

[Rcpp-devel] Loading Rcpp modules from dynamic library

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:
Error in Module(module, mustStart = TRUE) : 
  Failed to initialize module pointer: Error in FUN("_rcpp_module_boot_adding"[[1L]], ...): no such symbol _rcpp_module_boot_adding in package .GlobalEnv

The packages that you reference are all, well, packages, and from what I can tell about .onLoad(), that applies only to packages.  And the loadRcppModules function, apparently, must be called from an .onLoad function (because I get an error message to that effect).

I have never had a problem loading compiled functions this way; it appears to be only an issue with modules.

I would appreciate some helpful suggestions from anyone in R-land who may have had some success with this (e.g., specific documentation pages to look at, code snippets that have worked for others, or other useful suggestions on what to try next).  Of course, if what I want to do is known to be impossible, that would also be a helpful response. 

Respectfully,

Michael
On Feb 25, 2012, at 3:24 PM, Dirk Eddelbuettel wrote:

            
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1844 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120226/405b0135/attachment.bin>