[R] dyn.load and/or add new package (Windows 98)

Douglas Steele dsteele.demon.co.uk at dsteele.demon.co.uk
Wed Dec 2 22:48:54 CET 1998

In article <Pine.GSO.3.96.981202163520.12812C-100000 at toucan.stats>, Prof
Brian Ripley <ripley at stats.ox.ac.uk> writes
>On Wed, 2 Dec 1998, Yoon, Hoon (CICG - NY Program Trading) wrote:
>> Acutally the dll's on Splus could be compiled from VC++ and Borland.
>> http://www.mathsoft.com/support/splusmenu.htm
>> check the docs on cfortran.pdf
>> I am surprised that R can't do that. Am I misunderstanding something.
>Yes. This is not true for S-PLUS (see the V&R2 programming complements)
>and the same reasoning applies to R. You can build DLLs on other
>compilers, but then don't expect to be able to call system routines.
Actually, I said that the restriction on the Watcom compiler requirement
for S+ ONLY related to loading OBJ files.  Any compiler able to make a
32bit DLL could be used to create a loadable dll file for S+.  With S+
if one links to a copy of the system import lib, then system commands
can be called.

>BTW: Douglas Steele's caveat on DLLs is out of date: we do know how
>to build them natively on Windows in a way that works on all Windows
>platforms. Look back in instructions in the V&R2 `R complements' for
>details. (www.stats.ox.ac.uk/pub/MASS2/sites.html)
The most recent information I know on this is Guido's approach...

  "So, as Mumit said we need a binutils for Win32 
   which does not use the Windows crtdll.dll. One
   possibility is to use the cygnus binutils which 
   use the cygnus C library. So, I made the following two
   A) I replaced the egcs-1.1. binutils with the one from
   Cygnus B20 (only the binutils not the compiler); 
   recompiled rw0624 and its dll's;
   B) same but using gccwin32 (not egcs1.1).
   I tested the dll's so built on:
   b) win95+rw0624;
   without problems."

And I tested Guido's dll's on my system (Win95b) which could not load
Win95 natively built dll's  (that is built in SOME Win95 systems,
including mine).  Guido's dll worked OK.  However, his always did on my
system; some Win95 built dll's seemed OK on my system.

The only real test is to make the dll on a Win95 machine, using Guido's
approach, which up until that time had produced dll's which refused to
load.  I would be interested to hear if this specific test has been
done.  (I would have, but now use S+/Watcom/f2c and no longer have
enough space available).

If there have been further developments since then I would of course be

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