IDE Compiler Optimization Options for NetBeans IDE

I am using NetBeans 7.1 with GCC 4.7.I am trying to change the default optimization setting that is currently set to O2. In the project properties, I select "C ++ Compiler""Advanced Options" and add -O3. But when compiling, I still see on the command line that GCC uses -O2. How can I replace it with -O3 or any other option?

+4
source share
1 answer

First you need to set the parameters for the corresponding compiler (c / C ++). It seems that (at least Netbeans 7.0.1) adds extra parameters before the optimization switch, so this makes the optimization switch override your "extra parameters" -O.

Looks like you should rely on setting the development mode correctly. Performance mode will use -O3 instead of -O2.

+3
source

All Articles