[Rcpp-devel] RInside makefile on Windows

Dirk Eddelbuettel edd at debian.org
Sat Apr 23 00:18:45 CEST 2011


On 22 April 2011 at 16:59, Nathan Johnson wrote:
| Got it. You're first reply solved it, though I had accidently changed the
| wrong makefile *idiot*. 

Stuff happens, it is a pain that we need two for non-Windows and Windows.
 
| Next problem: I get this error when building in NetBeans or any shell. I
| have all header folders in my project properties, in the order RInside,
| Rcpp, R.  Thanks again for the advice. 
| 
| Error in loadNamespace(name) : there is no package called 'Rcpp'
| Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
| Execution halted
| Error in loadNamespace(name) : there is no package called 'Rcpp'
| Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
| Execution halted
| Error in loadNamespace(name) : there is no package called 'RInside'
| Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
| Execution halted
| Error in loadNamespace(name) : there is no package called 'RInside'
| Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
| Execution halted
| g++ -Ic:/PROGRA~1/R/R-2.12.2/include -Ic:/PROGRA~1/R/R-2.12.2/include/i386
| -O2 -Wall -Wall  -s  rinside_test0.cpp  -Lc:/PROGRA~1/R/R-2.12.2/bin/i386
| -lR -Lc:/PROGRA~1/R/R-2.12.2/bin/i386 -lRblas
| -Lc:/PROGRA~1/R/R-2.12.2/bin/i386 -lRlapack    -o rinside_test0
| rinside_test0.cpp:7:74: fatal error: RInside.h: No such file or directory
| compilation terminated.
| make: *** [rinside_test0] Error 1
| 
| BUILD FAILED (exit value 2, total time: 20s)

I have seen that too. I think that means the Rscript.exe call to query Rcpp
and RInside fails,  

Do you by chance have them installed in directory you point to via R_LIBS or
a similar variable?   For some reasone only the R gods know, R CMD ... etc do
__not__ read ~/.Rprofile so you may have use other ways to have Rscript find
Rcpp and RInside.   I think environment vars may work, as would copying the
installed RInside / Rcpp directories.

Dirk
 
 
| -----Original Message-----
| From: Dirk Eddelbuettel [mailto:edd at debian.org] 
| Sent: Friday, April 22, 2011 4:15 PM
| To: Nathan Johnson
| Cc: 'Dirk Eddelbuettel'; rcpp-devel at r-forge.wu-wien.ac.at
| Subject: RE: [Rcpp-devel] RInside makefile on Windows
| 
| 
| On 22 April 2011 at 16:00, Nathan Johnson wrote:
| | I tried cmd.exe and the Msys shell. 
| | 
| | Even if I hardcode each line, such as: 
| | RCPPFLAGS := 		C:/Program Files/R/R-2.12.2/bin/R CMD config
| | --cppflags
| | or
| | RCPPFLAGS := 		C:/ PROGRA~1/R/R-2.12.2/bin/R CMD config --cppflags
| 
| (No space though, right?)
| 
| | or
| | with $(...) included on each, the same errors still occur with 
| | "/bin/R" not found
| 
| First principles then.  Add a new target 'testThis' at the top of the
| Makefile.win and make it
| 
| testThis:
| 		C:/Program Files/R/R-2.12.2/bin/R --version
| 
| or
| 
| testThis:
| 		C:/Program Files/R/R-2.12.2/bin/R.exe --version
| 
| If you have R.exe in that location, and your $PATH is correct, then this
| should query R for its version.
| 
| If that works, adapt the rest of the Makefile accordingly.  If that doesn't
| work then I am not quite sure what else to suggest.
| 
| Dirk 
| 
| --
| Gauss has an Erdos number of -1.
|    -- #63 at http://www.gaussfacts.com
| 

-- 
Gauss has an Erdos number of -1.
   -- #63 at http://www.gaussfacts.com


More information about the Rcpp-devel mailing list