Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Explanation of QMAKE_CFLAGS_RELEASE and QMAKE_LFLAGS_RELEASE in mkspecs/qmake.conf

Explanation of QMAKE_CFLAGS_RELEASE and QMAKE_LFLAGS_RELEASE in mkspecs/qmake.conf

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 4.9k 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.
  • R Offline
    R Offline
    rubikon
    wrote on last edited by
    #1

    I want to compile Qt 5.0.2 statically with MSVC2010 and I tried to google how to do that.

    I've read that I should modify QMAKE_CFLAGS_RELEASE to '-Ol -Og -GL -MD' in the qmake.conf. The original flags are '-O2 -MD'

    Somewhere else I read that I have to modify QMAKE_LFLAGS_RELEASE.

    So I asked myself what do this flags mean? I wasn't able to find documentation of this macros/flags.

    Can someone explain me what this flags mean?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      CFLAGS are used at compilation time (by the compiler)
      LFLAGS at linking time (by the linker)

      The flags themselves are platform dependent

      The O flag is for optimization (speed/size etc...)
      MD to link against multi-threaded DLL runtime
      MT to link multi-threaded static runtime

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rubikon
        wrote on last edited by
        #3

        Thank you for your reply. That makes things a little bit clearer...

        If the O flag means optimization, what does the number or the second letter stands for? Ol, O2, Og?

        And what means the GL flag?

        What do I have to edit if I want a static build?

        Is there a general description of the flags?

        Edit: I think I found it "here":http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx

        Many questions :-)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Depends on what you mean by static build:

          Qt static against dynamic runtime ? (Recommended)
          Simply run configure with -static.

          If you want Qt static against static runtime you'll have to edit the makespec and change MD to MT (there might be other modifications to do but I don't know them from the top of my head)

          IIRC there is something about that in the documentation.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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