[Rd] Wrapping R for windows in a com dll

Prof Brian D Ripley ripley@stats.ox.ac.uk
Wed, 27 Sep 2000 13:51:50 +0100 (BST)


On Tue, 26 Sep 2000, Don Wingate wrote:

> Dear R Community,
> 
> I am trying to create a com dll wrapper for R in a mannor similiar to the R
> Com Server by Thomas Baier except that I would much rather avoid using the
> proxy dll ("Rproxy.dll"). Perhaps I don't really understand the reason for
> going throug the proxy in the first place, but it seems like an unnecessary
> indirection for an application which is not intended to use DCom. To this

Right, but it *is* intended to use DCOM.  You can directly link the R.dll
into your application too.

> end I have been trying to use the functions declared in rproxy_impl.h (I've
> tried rtest.c as well, aka the readme file in the front-ends directory). It
> is my understanding that these functions provide access to interface
> functions contained in R.dll. However, there does not seem to be an R.exp or
> R.lib file in the source code or R binary distribution.

There is in the binary distribution, as well as instructions on
how to build them in the source distribution.

> I work in the VC++ ide and am building a VC++ project. As I am sorely
> unpracticed in the use of makefiles and the command line for compiling, I
> have been avoiding the daunting task of compiling the R dll itself, if in
> fact that would be at all helpful. (From what I have been able to gather, it
> is either not possible or a big problem to compile R inside the VC++ ide, is
> this correct??)

VC++ is a big problem, period.  If it were standards-conforming, one could
build R with it, but it has too many bugs.

> My questions are as follows:
> 
> 1) Is it possible to build a project containing calls to functions contained
> in rtest.c and/or rproxy_impl.h from the VC++ ide?

rtest.c, yes. It's easy, but telling anyone how to use an IDE is
very lengthy, and the command-line versions are much much shorter.

> 2) Are the compiled R.exp and/or R.lib files available?

R.exp is in rw1011sp.zip!  Read readme.packages there, which has
explicit instructions for using VC++ to build an import library.

> 3) If these files are not available (or even if they are) is there another
> way to access R.dll which I have not tried, other than through RProxy.dll?
> 
> 4) Is there any documentation on the interface exposed by R.dll and its
> dependencies?

Yes, in the front-ends directory.  All you can do is pass commands to
R and receive back the results.


-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._