[R] Simple C-R interface, SEXP and other declarations
akahn1 at gmu.edu
Thu Aug 14 17:44:46 CEST 2003
I am trying to integrate OpenOffice Calc (OO) with R. One of the steps I am
taking is to create a very simple command line C program with the R shared
lib embedded in it. It would simply pass an R/S expression to R, print the
result, and catch errors. I know this is "overkill," but it is a step
toward something larger.
Has anyone done this before? If so, I would love to check out the code.
Anyway, when I try to follow the general theme on
I get some errors during compilation.
Where are things like "eval_R_command()" and "SEXP" defined? I.e. What do I
need to include to get these?
g++ -g -Wall -c hello.cc
g++ -g -Wall -c doit.cc
g++ -g -Wall -c myR.cc -L/usr/local/lib/R/bin -lR
myR.cc: In function `int eval_R_command()':
myR.cc:34: `SEXP' undeclared (first use this function)
(A bunch more errors)
make: *** [myR.o] Error 1
They say its the Early Bird that gets the worm,
but its the second mouse that gets the cheese...
More information about the R-help