On Sun, Nov 15, 2009 at 9:16 PM, Duncan Murdoch - murd...@stats.uwo.ca <+nabble+miller_2555+1412c7fca2.murdoch#stats.uwo...@spamgourmet.com> wrote: > > Sorry, I missed something else that's obvious: .Call needs a return value. > The c function needs to include Rinternals.h, and the function needs to > return a SEXP. So this works: > > #include <Rinternals.h> > SEXP Rwrite() { Rprintf("[%i] %s",12,"Hi"); return R_NilValue; } > > (and your ptest function will return NULL). > > Duncan Murdoch
Ah - I must not have read the documentation closely enough to realize a return value was required for external functions using the .Call interface. By not returning anything, I think my erroneous calls were mangling the stack heap. Thanks! Will ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel