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. QT Creator's .pro file - where is the debug/release intelligence
Qt 6.11 is out! See what's new in the release blog

QT Creator's .pro file - where is the debug/release intelligence

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 5 Posters 22.4k Views 1 Watching
  • 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by
    #1

    I'm learning about qmake files now, and read the online docs. I assumed that when I create a new project in QT Creator that it would create all kinds of config debug/release logic in the pro file for me.

    However, when I looked a pro file I created for a project, the .pro file has nothing like this (very simple). So where does QT Creator put all the settings to do with debug/release for my project?

    On that note, if I wanted to compile from the command line, would I have to manually add some settings to my .pro file so it can handle debug/release?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Qt creator does create one .pro file used for release and debug configuration.
      The switching between debug and release modes is done when qmake is called internally with command line parameters.

      Go to the left bar to the projects button. under tab "Build&Run" you can see the actual parameters used for the qmake run. You can change between release and debug modes there.

      BTW: it is Qt. The two upper case letters (QT) stand for Quick Time at least in devnet

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • ocgltdO Offline
        ocgltdO Offline
        ocgltd
        wrote on last edited by
        #3

        Although I am creating the app in Qt Creator, I will eventually have to compile from the command line on different OS's. Is there a standard way of adding debug/release or other platform info to a .pro file?

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          EDIT: I stand corrected by WoJo below

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • W Offline
            W Offline
            WoJo
            wrote on last edited by
            #5

            yes, there is. for example, different names for debug and releas build (appnameD.exe <-> appname.exe) modify the pro file like:

            @debug: TARGET = appnameD
            release: TARGET = appname@

            or:
            @debug {
            TARGET = appnameD
            }
            release {
            TARGET = appname
            }@

            To build from command line, just call:
            Debug build:
            @qmake
            make debug@

            Release Build:
            @qmake
            make release@

            1 Reply Last reply
            0
            • ocgltdO Offline
              ocgltdO Offline
              ocgltd
              wrote on last edited by
              #6

              Cool - I'll start with this and then add some other qmake config lines I found on stackoverflow... thanks

              1 Reply Last reply
              0
              • W Offline
                W Offline
                WoJo
                wrote on last edited by
                #7

                for more information read:
                "qmake project files":http://qt-project.org/doc/qt-4.8/qmake-project-files.html
                "qmake variable reference":http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  ziller
                  wrote on last edited by
                  #8

                  don't use

                  @debug: TARGET = appnameD@

                  The correct thing to do is

                  @CONFIG(debug, debug | release): TARGET = appnameD@

                  see http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#config

                  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