Skip to content

R.exp file for building packages

3 messages · Christopher G. Green (W), Brian Ripley, Agner Fog

#
I am trying to port some C code from S-Plus (7.0.6) to R (2.4.0) under
Windows XP SP2. I use Visual C++ 6.0 to build my library for S-Plus, so I'd
like to stick with that set up, if possible. According to the
README.packages file, I need the file R.exp (containing functions exported
from R.dll, I'm guessing) to build an R package with VC++.
in $RHOME/src/gnuwin32 if I chose an appropriate option back when I
installed R from the binary. I did a full install of R, but R.exp is
nowhere to be found. 

Is this file no longer included in the pre-compiled install for Windows? Is
there some other way I can recreate the R.exp file? I am currently trying
to hack something using 

dumpbin /exports "C:\program files\R\R-2.4.0\bin\R.dll" > exports

and editing "exports" into an R.exp file...but I'm not too clear on what
the file's supposed to look like.

Thanks,

Chris Green



________________________________

Christopher G. Green (cggreen AT stat.washington.edu)
Graduate Student 
Department of Statistics, Box 354322, 
Seattle, WA, 98195-4322, U.S.A. 
http://www.stat.washington.edu/cggreen/
#
On Mon, 13 Nov 2006, Christopher G. Green (W) wrote:

            
You are reading about old versions of R: R.exp has not been part of R for 
about a year.
Please do read more carefully README.packages, which says

Using Visual C++
================

You may if you prefer use Visual C++ to make the DLLs (unless they use
Fortran source!). First build the import library Rdll.lib by

         make R.exp
         lib /def:R.exp /out:Rdll.lib

You generate the file using the first of these lines: it starts

LIBRARY R.dll
EXPORTS
  ATTRIB
  AllDevicesKilled
  BODY
  Brent_fmin
#
Prof Brian Ripley wrote:

            
This requires building R from the source. There are a lot of things that 
can go wrong if you don't have the right tools. A much easier method for 
making R.exp is documented in the   RcppTemplate  package. I think the 
manual should refer to the   RcppTemplate  package for building DLL's 
with other compilers than Gnu.