[Rd] Embedded R in C

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Mon Oct 17 19:28:11 CEST 2005


NGUYEN Truong Hoan wrote:
> 	Hello everyone,
> 
> 	I would like to call the R functions from the C++ language
> interface, for example from a program composed on Microsoft Visual C++.
> I have referred the manual Writing R Extensions but i don't understand
> exactly how to make a declaration for the headers Rinternals.h or R.h...

Section 7.2 and in particular, section 7.2.2. of R-ext manual has a
complete example for embedding R in C/C++ code under windows.
    7.2 Embedding R under Windows
    7.2.2 Calling R.dll directly
It looks fairly straight forward and alright to me?

(Granted, IMHO, the section is a bit hiddne and should be placed a
bit earlier and before that stuff in section 5
"The R API: entry points for C code".


HTL



More information about the R-devel mailing list