[Rcpp-devel] C++11 in Windows R package

Matteo Fasiolo matteo.fasiolo at gmail.com
Wed May 28 23:58:54 CEST 2014


Dear Rcpp developers,

 I am working on a package <https://github.com/mfasiolo/mvnfast> which uses
Rcpp/RcppArmadillo, OpenMP and C++11.

Everything works fine under Linux: the package passes R CMD check --as-cran,
while tests and vignettes work fine.

I uploaded the package on win-builder, but I keep getting the error at the
bottom.

I have included the line CXX_STD = CXX11 in makefile.win as written in
"Writing
R extensions". I have read comments on
SO<http://stackoverflow.com/questions/18971177/building-r-package-with-c11-rcpp-on-windows>
regarding
Rtools not supporting many C++11
features. Is that the reason for the error or am I missing something?

Thanks,

Matteo

*** arch - i386
g++  -std=c++0x -I"D:/RCompile/recent/R-3.1.0/include" -DNDEBUG
-I"d:/RCompile/CRANpkg/lib/3.1/Rcpp/include"
-I"d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include"
-I"d:/Rcompile/CRANpkg/extralibs215/local215/include"     -O2 -Wall
-mtune=core2 -c dmvnCpp.cpp -o dmvnCpp.o
In file included from
d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloForward.h:28:0,
                 from
d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadillo.h:30,
                 from mvnfast.h:4,
                 from dmvnCpp.cpp:1:
d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloConfig.h:90:35:
fatal error: RcppArmadilloLapack.h: No such file or directory
compilation terminated.
make: *** [dmvnCpp.o] Error 1
Warning: running command 'make -f "Makevars.win" -f
"D:/RCompile/recent/R-3.1.0/etc/i386/Makeconf" -f
"D:/RCompile/recent/R-3.1.0/etc/i386/Makevars.site" -f
"D:/RCompile/recent/R-3.1.0/share/make/winshlib.mk" CXX='$(CXX1X)
$(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'
SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'
SHLIB="mvnfast.dll" OBJECTS="dmvnCpp.o mahaCpp.o msCpp.o rmvnCpp.o"'
had status 2
g++  -std=c++0x -I"D:/RCompile/recent/R-3.1.0/include" -DNDEBUG
-I"d:/RCompile/CRANpkg/lib/3.1/Rcpp/include"
-I"d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include"
-I"d:/Rcompile/CRANpkg/extralibs215/local215/include"     -O2 -Wall
-mtune=core2 -c dmvnCpp.cpp -o dmvnCpp.o
In file included from
d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloForward.h:28:0,
                 from
d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadillo.h:30,
                 from mvnfast.h:4,
                 from dmvnCpp.cpp:1:
d:/RCompile/CRANpkg/lib/3.1/RcppArmadillo/include/RcppArmadilloConfig.h:90:35:
fatal error: RcppArmadilloLapack.h: No such file or directory
compilation terminated.
make: *** [dmvnCpp.o] Error 1
Warning: running command 'make -f "Makevars.win" -f
"D:/RCompile/recent/R-3.1.0/etc/i386/Makeconf" -f
"D:/RCompile/recent/R-3.1.0/etc/i386/Makevars.site" -f
"D:/RCompile/recent/R-3.1.0/share/make/winshlib.mk" CXX='$(CXX1X)
$(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'
SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'
SHLIB="mvnfast.dll" OBJECTS="dmvnCpp.o mahaCpp.o msCpp.o rmvnCpp.o"
symbols.rds' had status 2
ERROR: compilation failed for package 'mvnfast'
* removing 'd:/RCompile/CRANguest/R-release/lib/mvnfast'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140528/c9f596b8/attachment.html>


More information about the Rcpp-devel mailing list