[Rcpp-devel] Rcpp, Windows and CMake

Jamie Olson jamie.f.olson at gmail.com
Wed Jan 29 16:39:06 CET 2014


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.

Environment:
R 3,0,2
Rtools 3.0
cygwin
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.

and

The native CMake refuses to use the Rtools gcc with MinGW Makefiles


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?

The documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain]
states:
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".


Thanks for any help you can offer,
--Jamie


Jamie Olson


More information about the Rcpp-devel mailing list