[Rcpp-devel] Rcpp, Windows and CMake
edd at debian.org
Wed Jan 29 16:56:04 CET 2014
On 29 January 2014 at 10:39, Jamie Olson wrote:
| Hi all,
| I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries
| in an R package. I need it to work in Windows, though, and I'm
| struggling to get things working.
| R 3,0,2
| Rtools 3.0
Not a good idea, in general, as "R is not supported on Cygwin".
Use something like MSys which gives you bash shell and terminal on top of
MinGW. But do make sure Rtools comes first in your path.
| Native CMake 2.8
| cygwin 2.8
| The cygwin CMake is convinced that the gcc installed by Rtools doesn't
| work, because it's passing cygwin paths in the generated Unix
| Makefiles. The gcc fails the testCCompiler.c check with an error
| "gcc.exe: fatal error: no input files". If I try to actually compile
| the file manually, it works as long as I use either relative or native
| windows paths.
| The native CMake refuses to use the Rtools gcc with MinGW Makefiles
CMake should work, outside Cygwin. Folks like Peter (who may chime in) have
used CMake with Rcpp/RInside.
| I have some questions:
| 1) What would I have to do to be able to use the cygwin mingw compiler
| instead of the Rtools version?
Port R to Cygwin. Many have tried. Nobody has really succeeded. In short: Don't.
| The documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain]
| Users developing packages with Rcpp need to ensure that they use a
| version built with exactly the same toolchain as their package: the
| recommendation is to build Rcpp from its sources yourself.
| Do I simply need to install Rcpp from source using my target compiler?
| Will that effect my ability to use the binary package on other
| systems(with CRAN Rcpp)?
| 2) The RInside package contains several cmake examples. The windows
| examples seem to imply cygwin, but I am unable to run them as
| indicated. I get the same gcc error: "no input files".
Yes they do, thanks to Peter. But what makes you think it implies Cygwin?
I'd be happy to adjust / clarify documentation as needed if you can give me a pointer.
| Thanks for any help you can offer,
| Jamie Olson
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel