Andre,

(Now just on rcpp-devel)

I had another quick look at this yesterday and noticed 

On 17 February 2011 at 13:14, Dirk Eddelbuettel wrote:
| On 17 February 2011 at 10:29, Andre Zege wrote:
| | I then run Rcpp.package.skeleton("mypackage"), put fun.cpp in mypackage/src 
and 
| | did 

That is not enough. You have to actually get the symbols of your Module
loaded at package load, typically via function .onLoad() in R/zzz.R -- see
the Section 3 of the Rcpp-modules vignette entitled 'Using modules in other
packages'. It lists the populate() helper function, you can also it by hand
as the Rcpp.package.skeleton() generated code does:

.onLoad <- function(pkgname, libname){
        # load the module and store it in our namespace
        unlockBinding( "yada" , .NAMESPACE )
        assign( "yada",  Module( "yada" ), .NAMESPACE )
        lockBinding( "yada", .NAMESPACE )
}

You'd have to do the same for your test module.

Dirk

-- 
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to