I reinstalled Rcpp, removed the package with R CMD REMOVE, run Rcpp.package.skeleton("cUtils"<div id=":47">, module=T), changed the package to one line<br> of C code, re-installed the package again with R CMD INSTALL, and checked it with R CMD check cUtils<br>
<br>At this moment the following is in the package <br><br>cUtils.cpp<br>=============================<br>#include "cUtils.h"<br>double myplus(double x, double y){<br> return x+y;<br>}<br><br>RCPP_MODULE(cUtils){<br>
using namespace Rcpp ;<br> function("myplus",&myplus);<br> }<br><br>cUtils.h<br>=================<br>#ifndef _cUtils_H<br>#define _cUtils_H<br>#include <Rcpp.h><br>#endif<br><br>===========<br>I am still getting the error<div class="im">
<br>
Error in FUN("_rcpp_module_boot_cUtils"[[1L]], ...) : <br> no such symbol _rcpp_module_boot_cUtils in package .GlobalEnv<br><br><br></div>The error happens in function getNativeSymbolInfo. I think it is because for some reason <br>
getNativeSymbolInfo(name, PACKAGE) gets PACKAGE=.GlobalEnv and i assume
it should be something else. I must be missing some simple point <br>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<br>
be greatly appreciated</div><br><br><br>