[Rd] Building Rdll.lib with Visual C++
William.Fulton at ubs.com
William.Fulton at ubs.com
Mon Nov 12 12:00:17 CET 2007
>-----Original Message-----
>From: Prof Brian Ripley
>Sent: 09 November 2007 12:17
>To: Fulton, William
>Cc: R-devel at r-project.org
>Subject: Re: [Rd] Building Rdll.lib with Visual C++
>
>On Fri, 9 Nov 2007, William.Fulton at ubs.com wrote:
>
>>> From the R-2.6.0/doc/README.packages it says:
>>
>> Using Visual C++
>> ================
>>
>> You may if you prefer use Visual C++ to make the DLLs (unless they
>> use Fortran source!). The notes here were tested with VC++6.
>>
>> First build the import library Rdll.lib by
>>
>> make R.exp
>> ...
>>
>> In the installation (R-2.6.0-win32.exe) there is no Makefile with an
>> R.exp target that I could find and I get (using Cygwin's make):
>>
>> $ pwd
>> /c/Program Files/R/R-2.6.0/src/gnuwin32 $ make R.exp
>> make: *** No rule to make target `R.exp'. Stop.
>>
>> I found a R.exp target in the gnuwin32/Makefile after extracting the
>> files in R-2.6.0.tar.gz. However, attempting to use this
>target fails,
>> it looks like it is attempting to build the object files in
>R.dll first.
>> Do I have to go figure out how to build R from Source in
>order to get
>> the Rdll.lib file or am I doing something fundamentally wrong?
>
>You do (although it only involves RTFM). Alternatively, you
>could be less selective in your reading, and note it also says
>
> (Another, less reliable, way to make R.exp is to use
>pexports.exe from
> mingw-utils.)
>
>The reason for the comment is that some earlier versions of
>pexports.exe used to choke, but it seems to work on all recent
>versions.
>
>> Perhaps the maintainers would consider shipping Rdll.lib in
>the future
>> with the distribution like the equivalent .lib file is done for
>> building extensions for Perl, Ruby, Tcl, Python etc.
>
>But they are built with VC++, and R is not. No such file is
>needed to build extensions for R using the recommended tools.
>
I've read the build instructions and as I feared, R inflicts the same
sort of pain on users for building from source for Windows as another
project I work on! As an aside, I've just discovered the mingw cross
compilers which now makes building for Windows super easy given the ease
with which packages can be installed on Ubuntu/Debian.
I opted for the pexports route given your helpful comments on the recent
versions working. It's all working and I've also sent a patch for
README.packages to the R-windows email address clarifying some of these
points.
William
Visit our website at http://www.ubs.com
This message contains confidential information and is in...{{dropped:28}}
More information about the R-devel
mailing list