[Qt-creator] gcc warnings

Duane duane.hebert at group-upc.com
Fri Feb 3 21:42:49 CET 2012

On 02/03/2012 03:11 PM, André Pönitz wrote:
> On Fri, Feb 03, 2012 at 01:54:13PM -0500, Duane wrote:

> The qmake CONFIG variable. Does it contain 'warn_on'? Or asked
> differently, does "CONFIG -= warn_on" in the .pro change anything?

Setting CONFIG -= warn_on in the pro file suppresses all warnings.
Where can I see the settings in CONFIG?

>> installed the SDK with whatever the defaults were for the most part.
>> I don't have -Wall set in the .pro file.
> What does a typical g++ line in the "Compile Output" pane look like
> when compiling your project?

I think I see what's happening.

  QMAKE_CXXFLAGS_WARN_ON += "-Wno-reorder"
QMAKE_CXXFLAGS_WARN_ON += "-Wno-unused-parameter"

in my pro file, a typical line looks like this:

g++ -c -pipe -g -Wall -W -Wno-reorder -Wno-unused-parameter -D_REENTRANT 

QMAKE_CXXFLAGS += "-Wno-reorder"
QMAKE_CXXFLAGS += "-Wno-unused-parameter"

a typical line looks like this:

g++ -c -pipe -Wno-reorder -Wno-unused-parameter -g -Wall -W -D_REENTRANT 

For some reason, in this case, the -Wall is after the first two. Not 
sure why that would be the case but it seems like that's the problem.

More information about the Qt-creator mailing list