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

Luke Tierney (luke@stat.umn.edu)
Mon, 17 Nov 1997 11:00:36 -0600 (CST)


From: Luke Tierney <luke@stat.umn.edu>
Message-Id: <9711171700.AA04611@nokomis.stat.umn.edu>
Subject: Re: R-beta: installing new packages in window95 version of R
To: thomas@biostat.washington.edu (Thomas Lumley)
Date: Mon, 17 Nov 1997 11:00:36 -0600 (CST)
In-Reply-To: <Pine.SUN.3.95.971117082433.1397A-100000@troi> from "Thomas Lumley" at Nov 17, 97 08:34:10 am

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

-- 
Luke Tierney
University of Minnesota                      Phone:           612-625-7843
School of Statistics                         Fax:             612-624-8868
206 Church Street                            email:      luke@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@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---