[Solved] .pro files and CompilerFlags
-
wrote on 4 Oct 2010, 15:26 last edited by
Hi,
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
Felix
@message($$QMAKE_CFLAGS_WARN_ON)@ -
wrote on 4 Oct 2010, 20:38 last edited by
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.
Ref : "http://doc.trolltech.com/4.6/qmake-variable-reference.html#qmake-cflags-warn-on":http://doc.trolltech.com/4.6/qmake-variable-reference.html#qmake-cflags-warn-on
-
wrote on 5 Oct 2010, 07:12 last edited by
Thanks for your reply, I tried that now. But unfortunately it still uses -w3 as flag for the compiler instead of -w4
-
wrote on 5 Oct 2010, 07:22 last edited by
By the way, what's the value of CXXFLAGS and CFLAGS in your Makefile? And which data is including the "-w3" on its value?
-
wrote on 5 Oct 2010, 07:30 last edited by
its only -W4 in it
-
wrote on 6 Oct 2010, 08:29 last edited by
i found the error. Qmake doesnt override existing makefiles. I deleted them manually and now it works
-
wrote on 15 Oct 2010, 12:47 last edited by
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?
-
wrote on 15 Oct 2010, 12:52 last edited by
have a look "here.":http://pepper.troll.no/s60prereleases/doc/qmake-variable-reference.html#qmake-cxxflags this might help you
-
wrote on 15 Oct 2010, 12:58 last edited by
Oh, that's good! How didn't I find this option! Thank you very much!