cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
g++ , vc2008, optimizer turn on
g++ , vc2008, optimizer turn on
Jun 14, 2010 at 5:22pm UTC
everid
(50)
hi masters,
i'm reading inside the c++ object model,
in chapter 3, it mentions things such like "turn on the compiler optimizer".
is there a "switch" such that i can turn on and off the optimizer of compilers, e.g. g++, vc2008?
Jun 14, 2010 at 6:17pm UTC
Duthomhas
(13206)
RTM.
For GNU, use the
-O1
or
-O2
switches.
For VC++, go to Project Options and set optimizations to the levels you want.
Hope this helps.
Jun 14, 2010 at 6:29pm UTC
Albatross
(4553)
Clone Thread:
http://cplusplus.com/forum/general/25062/
For GNU, there's also an
-O3
switch, and if you need it, an
-Os
switch that optimizes for size.
EDIT:
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
-Albatross
Last edited on
Jun 14, 2010 at 6:29pm UTC
Topic archived. No new replies allowed.