[R] Using C/C++

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 8 12:52:13 CEST 2000


> From: rwurzer at progis.co.at
> To: r-help at hypatia.math.ethz.ch
> Subject: [R] Using C/C++
> Date: Mon, 8 May 2000 12:27:23 +0200
> X-Priority: 3 (Normal)
> X-MIMETrack: Serialize by Router on PROGIS_EUROPE/PROGIS/AT(Release 5.0.1a 
(Intl)|17 August 1999) at 05/08/2000 12:27:28 PM, Serialize complete at 
05/08/2000 12:27:28 PM
> 
> Hi there!
> I´ve a problem with external c-code using in R. (Win2000 and R 1.0.0 for 
> WinNT/Win2000)
> My question is: what are the steps to get a c-code-function work in R
> with .C .
> Now I have a c code out.c which includes R.h and Rinternals.h!
> So i think i have to make a .dll file with a compiler but there are some 
> troubles like
> **out.obj : error LNK2001: Nichtaufgeloestes externes Symbol _Rf_unprotect
> **out.obj : error LNK2001: Nichtaufgeloestes externes Symbol _Rf_protect
> **out.obj : error LNK2001: Nichtaufgeloestes externes Symbol 
> _Rf_allocMatrix
> **out.obj : error LNK2001: Nichtaufgeloestes externes Symbol _Rf_length
> Thank you for every help!

Do please read readme.packages in rw1001sp.zip for information on this.
You need to make an import library and link against it.  The easiest way
to do so is to set up a small R package and build that.  That file
has information on using Visual C++ and the mingw32/cygwin gcc compilers.
If you are using anything else you will need to adapt the instructions.
(The next version will have instructions for Borland C++ 5.5 too.)

Also, I suggest you upgrade to 1.0.1, as we are not going to be able to help
you with versions we no longer use.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list