R-beta: How do I dyn.load in R for Windows95?

guido@sirio.stat.unipd.it guido at sirio.stat.unipd.it
Thu May 14 15:42:18 CEST 1998

Thor Thoresen writes:
> I am currently running R under Windows95.
> dyn.load("cat.obj")
> then
> source("cat.s")
> in order to run the added functions.
> Error in dyn.load(x) : unable to load shared library
> "C:\Program\r.gnw\library\cat\cat.obj"
> However if I instead make a reference to the directory were my
> Fortran file resides R still comes up with an error message:
> dyn.load("cat")
> Error in dyn.load(x) : unable to load shared library
> "C:\Program\r.gnw\library\cat"
> I have tried to "invoke" R  from different directories (by providing
> different initial directories in the Windows95 program information file)
> so it will have no reason to miss the Fortran object file. I have also
> tried different suffixes to the Fortran
> file such as .o and .for. I suppose I also have to rename the "cat.s"
> file to "cat.R"
  You have to build a dll (dynamic link library). It is not a problem
  of suffixes. If you get the above message the file is found.
  But its format is not the one expected.
  You should be able to build a dll with the compiler that you use
  to make the cat.obj file. This dll must be self contained (see below).
> (by the way, I have not managed to dyn.load the file (zero.c) residing
> in the directory "\demos\dynload\" either)
  This opens another question. With the actual pre-compiled  distribution
  of R for Win95 (both of them) is impossible to have a dll calling
  a routine in main executable. I hope to make available a version
  of R with this capability soon (next few days). But, in this period,
  i.e., always, time is diffucult to find.
  guido masarotto
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