Rev 5178 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
Linking the R DLL into other applications=========================================The file rtest.c provides an example of linking the R engine intoanother front end. To build it- edit it to set Rp->rhome and Rp->home appropriately.- to make with gcc, make -f make.rtest- to make with VC++,copy ..\R.exp and ..\R.dll to this directorylib /def:R.expcl /MT /Ox /D "WIN32" /I..\..\include /I.. rtest.c R.libThis provides an rterm-like test front end. The main loop is in themain program here: R_ReplDLLdo1() parses one line (up to ; or \n) andreturns 1 if complete, 2 if incomplete as an R expression.There is a callback available during evaluation, plotting and console I/O,intended to be used for processing GUI events. (The pager and graphicswindows' GUI events are handled at these times by ProcessEvents: thecallback is called from within ProcessEvents.)An alternative to linking the import library would be to explicitlyload the DLL from a known location or after searching for it.