I am attempting to take a copy of the entire splines.c file and use this for compilation into a new project (so I can call spline_basis() directly, but preserve the identity and integrity of the original work.
When I tried to pack this code into the include for the inline cxxfunction call I ended up with compile errors like: file81b983.cpp: In function 'SEXPREC* spline_basis(SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*)': file81b983.cpp:143:1: error: 'coerceVector' was not declared in this scope file81b983.cpp:144:35: error: 'length' was not declared in this scope file81b983.cpp:156:1: error: 'allocMatrix' was not declared in this scope file81b983.cpp:157:1: error: 'allocVector' was not declared in this scope file81b983.cpp:179:33: error: 'install' was not declared in this scope file81b983.cpp:179:43: error: 'setAttrib' was not declared in this scope These errors pertain to lines like: PROTECT(knots = coerceVector(knots, REALSXP)); PROTECT(val = allocMatrix(REALSXP, sp->order, nx)); I tried a similar action on the famous convolve2 code from "Writing R Extensions" with very similar result. ( I also tried adding the pre-pended directive 'extern "C" 'to the function declaration.) I am pretty sure that the problem has to do with compiling C code using a C++ compiler, but I thought I might get away with it. Does this prompt any thoughts, or should I just give up on this path.
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel