I am creating a new package:
- The package name contains a period: for example, my.package
- A package exports one Rcpp function: for example, rcppfunction
When I create a package using Rcmd INSTALL , compileAttributes used behind the scenes to automatically create the exported function,
RcppExport SEXP my.package_rcppfunction(...)
and I get a compilation error due to a dot in the exported name:
RcppExports.cpp:10:19: error: expected initializer before '.' token
As a workaround, I can change the name of the package to remove a point from it, but I want a better solution and understand how characters are exported. So my question is:
- How can I parameterize the generated code to replace the dot with "_" for example (perhaps by specifying some parameters to the export attribute).
- Or How to change the g ++ call to make it compile such dashed characters.
I don't know if this will help, but here is my g ++ call:
g++ -m32 -I"PATH_TO_R/R-30~1.2/include" -DNDEBUG - I"PATH_To_R/3.0/Rcpp/include" - I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
source share