[Rcpp-devel] a question about missing rcpp.h

Xinda Yang xinda.yang at unsw.edu.au
Tue Oct 11 06:10:23 CEST 2016


Dear all

I am using a Windows 7 system, R studio 0.99.467, R x64 3.3.1 and R tools 34.

I have been trying to run sourceCpp("reglinRcpp.cpp") in my R studio and got the following error message. It seems clear that the issue is that the Rcpp.h file cannot be found. So I have tried to run set PKG_CXXFLAGS='-I/H:/R/win-library/3.3/Rcpp/include' in the windows command window (see attached screenshot). However, this does not solve the issue. Could anyone advise me what I should do? Thanks a lot in advance!

Kind regards
Xinda


c:/Rtools/mingw_64/bin/g++  -I"C:/PROGRA~1/R/R-33~1.1/include" -DNDEBUG     -I"//INFPWFS1014.ad.unsw.edu.au/Staff081z3271570/R/win-library/3.3/Rcpp/include" -I"C:/Users/z3271570/Desktop/rsrcpp"  -I"d:/Compiler/gcc-4.9.3/local330/include"  -std=c++11   -O2 -Wall  -mtune=core2 -c reglinRcpp.cpp -o reglinRcpp.o

reglinRcpp.cpp:1:18: fatal error: Rcpp.h: No such file or directory

 #include <Rcpp.h>

                  ^

compilation terminated.

make: *** [reglinRcpp.o] Error 1

Warning message:

running command 'make -f "C:/PROGRA~1/R/R-33~1.1/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="sourceCpp_17.dll" WIN=64 TCLBIN=64 OBJECTS="reglinRcpp.o"' had status 2

Error in sourceCpp("reglinRcpp.cpp") :

  Error 1 occurred building shared library.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20161011/babe8826/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: reglinRcpp.cpp
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20161011/babe8826/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture.PNG
Type: image/png
Size: 2082 bytes
Desc: Capture.PNG
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20161011/babe8826/attachment.png>


More information about the Rcpp-devel mailing list