Code::Blocks

User forums => Help => Topic started by: Bambusinspektor on September 06, 2019, 07:29:49 pm

Title: Remove Hidden Compiler Flags
Post by: Bambusinspektor on September 06, 2019, 07:29:49 pm
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
Title: Re: Remove Hidden Compiler Flags
Post by: BlueHazzard on September 06, 2019, 08:34:27 pm
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.
Title: Re: Remove Hidden Compiler Flags
Post by: Bambusinspektor on September 06, 2019, 08:48:26 pm
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