Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Disable MSVC compiler warnings

    General and Desktop
    2
    3
    3882
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Andy314
      Andy314 last edited by

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

      QMAKE_CXXFLAGS += -wd4189
      QMAKE_CXXFLAGS_WARN_OFF += -wd4189
      QMAKE_CFLAGS_WARN_OFF += -wd4189
      QMAKE_CXXFLAGS_DEBUG+= -wd4189
      QMAKE_CFLAGS_RELEASE += -wd4189
      QMAKE_CFLAGS_DEBUG+= -wd4189
      QMAKE_CFLAGS_RELEASE += -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

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User last edited by

        Hi,
        you've probably already seen this posting on stackoverflow ( http://stackoverflow.com/questions/20402722/why-disable-specific-warning-not-working-in-visual-studio ) 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 ^_^

        Andy314 1 Reply Last reply Reply Quote 1
        • Andy314
          Andy314 @Guest last edited by

          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.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post