[Rcpp-devel] Error in FUN("_rcpp_module_boot

andre zege andre.zege at gmail.com
Mon Jun 20 03:22:53 CEST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110619/8128a0a5/attachment.htm>


More information about the Rcpp-devel mailing list