[R] Handling R Objects in C
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Feb 26 17:06:07 CET 2004
On Thu, 26 Feb 2004, pascal dessaux wrote:
> Hello
>
> I want to handle R from a C/C++ project developped with Microsoft Visual
> C++.Net
>
> I put a multiproject solution,and one project is a win32 and dedicated for R
> manipulation;
>
> When I put in this project the example code from "Written R extension" 4.7
> Handling R objects in C p39:
(Note: page numbers are useless as they depend on the page size you used
when producing the manual.)
> #include <R.h>
> #include <Rdefines.h>
> SEXP ab;
> PROTECT(ab=NEW_NUMERIC(2)) ;
> ....
>
> I got an unresolved external in the link, because I don't know what I need
> to declare as an external library,I searched in the documentation but I
> didn't find
It is in readme.packages in the Windows distribution. You need to make an
import library for R.dll, and that tells you how to do so.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list