[Rcpp-devel] RInside under Windows

Dirk Eddelbuettel edd at debian.org
Tue Feb 14 18:53:27 CET 2012


Hi Pat,

On 14 February 2012 at 17:43, Patrick Burns wrote:
| Good point about the Rtools version.  I started
| with 2.13, but I get the same thing with 2.14.
| 
| Here are the key changes that I made to Makefile.win:
| 
| RCPPINCL := -IC:/Users/pat/Documents/R/win-library/2.14/Rcpp/include
| RCPPLIBS := 
| C:/Users/pat/Documents/R/win-library/2.14/Rcpp/libs/i386/Rcpp.dll
| 
| RINSIDEINCL := -IC:/Users/pat/Documents/R/win-library/2.14/RInside/include
| RINSIDELIBS := 
| C:/Users/pat/Documents/R/win-library/2.14/RInside/libs/i386/libRInside.dll

That's not quite right, is it?  What do (quoting from examples/standard/Makefile.win)
these do:

## include headers and libraries for RInside embedding classes
RINSIDEINCL := 		$(shell echo 'RInside:::CxxFlags()' | $(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)
RINSIDELIBS := 		$(shell echo 'RInside:::LdFlags()'  | $(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)

| I then do:
| 
| make -f Makefile.win
| 
| I seem to have failed in my attempt to
| tell it where R lives -- I get a cygwin
| warning about MS-DOS style path, but I
| don't think that is really a problem.

R_HOME must be defined. You can get it from R, or hardcode it.

The single best start is to try

    cd examples/standard
    make -f Makefile.win

which should create 10+ executable. And you can borrow freely from that
Makefile.win which should work.

Lastly, the Cygwin thing is line noise which you can suppress by setting an
env var appropriately. This comes from the newer Rtools.

| It then attempts the g++ command, gives
| the multiple definition statements, and:

Linking is still wrong then.
 
Dirk


-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx


More information about the Rcpp-devel mailing list