Code::Blocks Forums

User forums => Help => Topic started by: TomerA on September 23, 2011, 06:27:51 pm

Title: Compiler settings not doing anything
Post by: TomerA on September 23, 2011, 06:27:51 pm
I have a project which the only build settings are "-g -Wall"
Yet, it tries to build it like that:

Quote
mingw32-gcc.exe -Wall  -Wall -g  -std=gnu++0x    -c C:\Cshit\projects\Ctest\main.c -o obj\Debug\main.o
For some reason it adds another "-Wall" and "-std=gnu++0x" which of-course generate a warning messages since this is a C type file.

I'm using SVN 7280 version (built on 26/6/11) under Windows Vista.
Title: Re: Compiler settings not doing anything
Post by: Jenna on September 23, 2011, 06:31:01 pm
Check the settings of the project and target.
And especially check the global compiler settings (the most common source for such issues).
Title: Re: Compiler settings not doing anything
Post by: TomerA on September 23, 2011, 06:35:20 pm
Check the settings of the project and target.
And especially check the global compiler settings (the most common source for such issues).
The global compiler settings are empty (I thought they are being override by project's settings anyway, don't they?), and the target is correct (Debug in my case).
Title: Re: Compiler settings not doing anything
Post by: oBFusCATed on September 23, 2011, 07:54:51 pm
I thought they are being override by project's settings anyway, don't they?
Depends on a setting in the build options
Title: Re: Compiler settings not doing anything
Post by: Jenna on September 23, 2011, 07:58:53 pm
The global compiler settings are empty (I thought they are being override by project's settings anyway, don't they?), [...]
The global options are alwaqys added, but you can chose whether project options are added or prepended to the target options.

Compiler settings can be either in the "Compiler flags" or in the other "Other options" tab (for settings without checkbox).
And they can be made for the whole project, or for the target only (highlight the projects name or the targets name in the "Build options").

Please check all of these possibilities.

C::B does add build-flags on its own.
Title: Re: Compiler settings not doing anything
Post by: TomerA on September 23, 2011, 11:52:11 pm
Turns out I'm an idiot, it was "hidden" under "other options" in the global settings :(
Thanks a lot!

I'm a really big fan of C::B.