From ripley at stats.ox.ac.uk  Tue Nov 14 08:09:49 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 14 Nov 2006 07:09:49 +0000 (GMT)
Subject: [Rd] R.exp file for building packages
In-Reply-To: <007b01c707ae$2e9d1960$ad115f0a@stat.washington.edu>
References: <007b01c707ae$2e9d1960$ad115f0a@stat.washington.edu>
Message-ID: <Pine.LNX.4.64.0611140704260.28875@gannet.stats.ox.ac.uk>

On Mon, 13 Nov 2006, Christopher G. Green (W) wrote:

> 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++.
>
>> From what I've read in the archives of this list, R.exp should be installed
> 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.

You are reading about old versions of R: R.exp has not been part of R for 
about a year.

> 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.

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

-- 
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



[Rd] R.exp file for building packages
Prof Brian Ripley