Displaying 1 result from an estimated 1 matches for "showargs_ext".
2012 Sep 09
0
Different behavior of the "showArgs" example (R extension manual) between gcc and Visual C++ compiled code
...dll!63551cba()
CODE
====
// R code
library(showArgs)
blah = as.Date('2000-01-01')
printArgs(a=1:3, b=LETTERS[1:3], blah=blah)
// END R code
// C/Cpp code:
extern "C" { // because I compile the code 'as C++' for Visual C++, for in-code variable declaration
SEXP __cdecl showArgs_ext(SEXP args);
}
SEXP __cdecl showArgs_ext(SEXP args)
{
// snip
args = CDR(args); /* skip 'name' */
for(int i = 0; args != R_NilValue; i++, args = CDR(args)) {
// verbatim from the manual
}
return R_NilValue;
}
// END C/Cpp code
Vcc Compilation settings:
/I"C:\bin\R\R\include&quo...