Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] .pro files and CompilerFlags
QtWS25 Last Chance

[Solved] .pro files and CompilerFlags

Scheduled Pinned Locked Moved Qt Creator and other tools
9 Posts 3 Posters 7.0k Views
  • 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.
  • F Offline
    F Offline
    Felix
    wrote on last edited by
    #1

    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)@

    1 Reply Last reply
    0
    • N Offline
      N Offline
      ngrosjean
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Felix
        wrote on last edited by
        #3

        Thanks for your reply, I tried that now. But unfortunately it still uses -w3 as flag for the compiler instead of -w4

        1 Reply Last reply
        0
        • N Offline
          N Offline
          ngrosjean
          wrote on last edited by
          #4

          By the way, what's the value of CXXFLAGS and CFLAGS in your Makefile? And which data is including the "-w3" on its value?

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Felix
            wrote on last edited by
            #5

            its only -W4 in it

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Felix
              wrote on last edited by
              #6

              i found the error. Qmake doesnt override existing makefiles. I deleted them manually and now it works

              1 Reply Last reply
              0
              • V Offline
                V Offline
                VC15
                wrote on last edited by
                #7

                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?

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  Felix
                  wrote on last edited by
                  #8

                  have a look "here.":http://pepper.troll.no/s60prereleases/doc/qmake-variable-reference.html#qmake-cxxflags this might help you

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    VC15
                    wrote on last edited by
                    #9

                    Oh, that's good! How didn't I find this option! Thank you very much!

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved