Skip to content
Prev 8798 / 10988 Next

[Rcpp-devel] [rinside] compiling e QT + RInside on win7 have some problems

Dear John Buonagurio,
? ? Tks a lot for your guide, finally, i make it success to run the qtdensity example, i think there is a lot of details should be careful to get it work. I even do not know why ?it works now exactly(the order path setted in PATH may be a key point). Although i can not remember the details, i will list the environment for me to run the qtdensity:


1. win 7 32 bits;R 3.1.2( and the corresponding R tools);MingW 4.8.2; QT 4.8.6 for windows compiled by MingW 4.8.2,also Rcpp, RInside source codes,
2.(MAY BE as ?I said ) make sure to remove R tools\gcc-4.6.3\bin in PATH when compiling, that is , not just put the MingW 4.8.2\bin in PATH before it(this point may not be correct, but you should try to follow it when you don not familiar with the process, i say this because when you install R tools in windows, the path of R tools may be automaticly setted in PATH, thus, when you compile Rcpp and RInside, the compile may automaticly use the R tools Gcc 4.6.3, so ?i think for new user, the easiest thing is to remove it when compiling)
3. Set ?"C:\Rtools\bin;C:\mingw-w64-gcc-4.8.2-stable-r10\bin;C:\R\R-3.1.2\bin" in PATH with the exact order.(The version of MingW 4.8.2 I used is the version when you install QT 4.8.6, the installer will give a hint for you before install it, the hint will remind you to use MingW 4.8.2 and give a URL to download it , and i used that version)
4.compile Rcpp and RInside using:
install.packages("Rcpp_xxx.tar.gz", repos = NULL, type = "source", INSTALL_opts=c("--no-multiarch")) or install.packages("Rcpp", type = "source", INSTALL_opts=c("--no-multiarch"))  
I think both will work, as i compiled Rcpp in the first format, and RInside the latter one.(the latter one in fact will download the source first then do the same thing with the first one)
5. If your R is installed in a path have spaces like what i have:C:\Program Files\SUPO\R\R-3.1.2, you should be carefully with the path, because the Makefiles and .pro files will have some problems to do the correct thing, actually, i modified the .pro file with the following sentence:
RINSIDEINCL = 		$$system($$R_HOME/bin/Rscript -e \"RInside:::CxxFlags\(\)\")
to:
RINSIDEINCL = 	 ?-I"C:/PROGRA~1/SUPO/R/R-31~1.2/library/RInside/include"
Because, however, the RInside:::CxxFlags() return a :C:\Program Files\ in my PC, and the Makefile seems failing to make it correct, so i modify this myself, otherwise you will get some errors.
6. Following qtdensity example guides, Finally, i think you should run the qtdensity example.like me.


NB: the above steps are not the whole process, you should check the above steps based on you tried the original steps introduced by the author Dirk Eddelbuettel.










--

PO SU
mail: desolator88 at 163.com
Majored in Statistics from SJTU
At 2015-06-22 21:44:28, "John Buonagurio" <jbuonagurio at exponent.com> wrote: