From ripley at stats.ox.ac.uk  Thu Jan 10 08:55:29 2013
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 10 Jan 2013 07:55:29 +0000
Subject: [Rd] Cannot override default  -O3 flag on Winodws,
 dll does not have symbols
In-Reply-To: <1357786702776-4655106.post@n4.nabble.com>
References: <1357786702776-4655106.post@n4.nabble.com>
Message-ID: <50EE73F1.1010800@stats.ox.ac.uk>

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



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