R-beta: installing new packages in window95 version of R

Luke Tierney luke at stat.umn.edu
Mon Nov 17 18:00:36 CET 1997

Thomas Lumley wrote:
> If you find out how to mark functions for export from a DLL and it still
> doesn't work then another possibility is that Powerstation uses different
> name mangling from what R expects (eg an underscore before or after the
> function name). The symbol.F() function will tell you what R thinks the
> name should be, and if you build a small, simple DLL and look at it with a
> text editor you will find what the DLL thinks the function name is. 
> Probably there's a better solution than using a text editor but I'm not up
> on Windows programming. 

VC++ includes a utility called DUMPBIN -- it may be in their fortran
distribution as well.

One potential problem is with the calling conventions. Watcom uses a
register based method that appears to be different from the optional
resgister-based one under MS. The default under MS is I think a stack
based convention. If the R .exe is compiled with default calling
conventions then it *may* work to have MS Fortran generate code for
regieter-based calls (there may be a flag you can set for that) but
I'm worried there may be more differences than argument passing, that
the conventions on who saves and restores other registers may be
different. If that is indeed the case then calls may appear to work in
some contexts but not in others.


Luke Tierney
University of Minnesota                      Phone:           612-625-7843
School of Statistics                         Fax:             612-624-8868
206 Church Street                            email:      luke at stat.umn.edu
Minneapolis, MN 55455 USA                    WWW:  http://www.stat.umn.edu
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