[Rd] problem customizing CXXFLAGS in Windows

Ian Fiske ianfiske at gmail.com
Fri Apr 18 18:25:28 CEST 2008


Hi all,

I am running R 2.6.2 in Windows XP with Rtools 2.7 and am trying to compile
a shared library in Windows with customized level of optimization. 
Specifically, I would like to have "-O3 -funroll-loops" as flags when I run
"R CMD SHLIB ***.cc" to speed the program for my simulations.

I have read through the documentation and have tried adding the line 

PKG_CXXFLAGS = -O3 -funroll-loops

in my Makevars in my package's src directory.  However, this places the
flags before the -O2 flag, thereby overriding it.  I have also tried
creating a config.site file in R_HOME/etc, but that seems to be ignored.

I found a possible solution at
http://tolstoy.newcastle.edu.au/R/e2/devel/07/03/2520.html.  However, when I
use this suggestion, I get errors that R.h cannot be found.

Please note that I do not plan to submit this package to CRAN or to other
users with the modified flags, but I just need to set them on my machine to
speed up simulations for testing, etc.

I appreciate any suggestions,
Ian
-- 
View this message in context: http://www.nabble.com/problem-customizing-CXXFLAGS-in-Windows-tp16763558p16763558.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list