Important: Please read the Qt Code of Conduct -

Disable MSVC compiler warnings

  • I use QtCreator with MSVC 2013 and cannot eliminate this damned compiler warnings. I tested:

    QMAKE_CXXFLAGS += -wd4189
    QMAKE_CFLAGS_WARN_OFF += -wd4189
    QMAKE_CFLAGS_DEBUG+= -wd4189

    Nothing helps ! Here is the line generated from qmake:

    cl -c -nologo -Zc:wchar_t -FS -wd4189 -Zi -MDd -wd4189 -GR -W3 -w34100 -w34189 -w44996 -EHsc

  • Hi,
    you've probably already seen this posting on stackoverflow ( ) but perhaps it helps. So maybe you want to try QMAKE_CXXFLAGS_WARN_ON -= -wd4189. I think it would be a bit weird if it worked but who knows ^_^

  • Hi @Wieland ,
    Wow :-) this is the solution.
    I think the problem was the order of the switches in the command line created from QMake. It puts the QMAKE_CXXFLAGS_WARN_ON at the end of it, so you can overwrite the previous warning settings.

    Thank you very much.

Log in to reply