News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Remove Hidden Compiler Flags

Started by Bambusinspektor, September 06, 2019, 07:29:49 PM

Previous topic - Next topic

Bambusinspektor

Hello,

I am running Windows 10 and I have tested Code::Blocks with Mingw-64 and Clang (Windows) and Clang (gcc).
I am struggling with the compiler flags "-Wall -fexceptions -O2" which I want to remove but I am not able to. In the "Compiler settings" the Options -Wall and -O2 are not checked and the flag "fexceptions" is nowhere to be found. They are also not listed under Other Compiler options. When I go to Other Settings->Advanced Options the command line looks like this: $compiler $options $includes -c $file -o $object
When I remove the "$options" the 3 flags are removed but this prevents me from adding other flags under the Compiler Settings.

Thanks

BlueHazzard

There are 2 (actually 3) places where the compiler flags are set:
1) Project->Build options
    a) On project level (select the project name on the left)
    b) On target level (select the target name on the left)
2) Settings->Compiler->Select your compiler from the drop down
(3) Settins->Compiler->Advanced compiler options)

Somewhere there you have to remove the setting.

Bambusinspektor

#2
Okay thank you. I thought there were only 2 places (global settings and build settings) but now I found the Project settings too.
Thank you very much