[Solved] .pro files and CompilerFlags
I'm using Qt-Creator with VS2010 compiler.
When I'm adding
@QMAKE_CFLAGS_WARN_ON += -W4@ to my .pro file, the compiler is still called with -w3. Also when im changing the qmake.conf file to -w4 he still uses -w3 .
When I display the content of the QMAKE_CFLAGS_WARN_ON variable, its only -w4 in it. So why is make called with -w3?
i dont understand this behaviour, and would be glad about any suggestions
As I understand the doc and as I use the qmake, I put the flag...
@CONFIG += warn_on@
... to maximize the warning at compilation time, and so I don't set the value of QMAKE_CFLAGS_WARN_ON directly.
Thanks for your reply, I tried that now. But unfortunately it still uses -w3 as flag for the compiler instead of -w4
By the way, what's the value of CXXFLAGS and CFLAGS in your Makefile? And which data is including the "-w3" on its value?
its only -W4 in it
i found the error. Qmake doesnt override existing makefiles. I deleted them manually and now it works
I have a similar problem. I use Qt 4.7 with MinGW 4.5 under Windows 7. I want to add some specific warning options (e.g. -Weffc++, -Wenum-compare, -Wfloat-equal, etc.) to compiler invocation string. I cannot find a way to do it. Does anybody know?
have a look "here.":http://pepper.troll.no/s60prereleases/doc/qmake-variable-reference.html#qmake-cxxflags this might help you
Oh, that's good! How didn't I find this option! Thank you very much!