[Rd] Cannot override default -O3 flag on Winodws, dll does not have symbols

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jan 10 08:55:29 CET 2013


On 10/01/2013 02:58, rtaylor wrote:
> In trying to compile a package with c code using Rtools, -O3 is added by
> default. This comes from Makeconf?  Compiler flags (CFLAGS="-O0 -g" ) set in
> src/Makevars.win or src/Makevars appear before this.
>
> nm pkg.dll reveals no symbols!

That is not a function of using -O3, if there is useful code (as there 
needs to be in an R package since you need to link to entry points).
>
> How can I compile a Windows package with "-O2 -g"?

By following the manuals.  'Writing R Extensions' points you to your 
local version of
http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Customizing-package-compilation

But it you want debug symbols, read about how to build a debug version 
of R in that manual (and use -gdwarf-2).


>
> Thanks,
> RT
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Cannot-override-default-O3-flag-on-Winodws-dll-does-not-have-symbols-tp4655106.html
> Sent from the R devel mailing list archive at Nabble.com.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list