[Rcpp-devel] RInside makefile on Windows

Dirk Eddelbuettel edd at debian.org
Tue Apr 26 22:36:03 CEST 2011


Nate,

On 26 April 2011 at 11:36, Nathan Johnson wrote:
| Hi Dirk, 
| 
| I re-installed the Rcpp and RInside directories to R_HOME/library/ . That
| did the trick. Building on NetBeans is no problem. 
| 
| Next issue occurs when running the code. I get the following message in the
| output window "make: Nothing to be done for 'all'.". This is followed by a
| message box that says "./dist/Debug/MinGW-Windows/testrcpp does not exist or
| is not an executable". I checked, and surely it does not exist, likely due
| to the first error mentioned. 

The Makefile.win is meant for a make interpreter such as GNU make following
the usual conventions.  If Netbeans does anything differently, you are on
your own.

What we support is follows the established and standard coding practice for
R, including its support on Windows.  

Hth, Dirk

 
| I have not modified the makefile, except for changing the location of
| R_HOME. Here are the lines associated to "all" in my makefile: 
| sources := 		$(wildcard *.cpp)
| programs := 		$(sources:.cpp=)
| all : 			$(programs)
| 
| Thanks for all the help, and code development. 
| 
| Nate
| 
| -----Original Message-----
| From: Dirk Eddelbuettel [mailto:edd at debian.org] 
| Sent: Friday, April 22, 2011 5:19 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: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 
| | g++ -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
| 

-- 
Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com


More information about the Rcpp-devel mailing list