I reinstalled Rcpp, removed the package with R CMD REMOVE, run
Rcpp.package.skeleton("cUtils"
, module=T), changed the package to one line
of C code, re-installed the package again with R CMD INSTALL, and checked
it with R CMD check cUtils
At this moment the following is in the package
cUtils.cpp
=============================
#include "cUtils.h"
double myplus(double x, double y){
return x+y;
}
RCPP_MODULE(cUtils){
using namespace Rcpp ;
function("myplus",&myplus);
}
cUtils.h
=================
#ifndef _cUtils_H
#define _cUtils_H
#include <Rcpp.h>
#endif
===========
I am still getting the error
Error in FUN("_rcpp_module_boot_cUtils"[[1L]], ...) :
no such symbol _rcpp_module_boot_cUtils in package .GlobalEnv
The error happens in function getNativeSymbolInfo. I think it is because for
some reason
getNativeSymbolInfo(name, PACKAGE) gets PACKAGE=.GlobalEnv and i assume it
should be something else. I must be missing some simple point
that sets environment correctly, but as i don't have any working modules, i
don't know where to look for correctly functioning example. Any pointers
would
be greatly appreciated
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel