I am building a new package:
- The package name contains a dot: for example my.package
- The package exports one Rcpp function: for example rcppfunction
When I build the package using Rcmd INSTALL, compileAttributes is used behind the scene to automatically generate exported function,
RcppExport SEXP my.package_rcppfunction(...)
and I get a compilation error due to the dot in the exported name:
RcppExports.cpp:10:19: error: expected initializer before '.' token
As a workaround , I can change the package name to remove the dot from it , but I want better solution and to understand how the symbols are exported. So my question is:
- How can I parametrize the generated code to replace dot by a "_" for example (Maybe by giving some parameters to the export attribute) .
- Or How to change the g++ call to force it to compile such dotted symbols..
I don't know if this can help , but here 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