Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. detect debug/release in .pro file: message is only correct 2 out of the 3 messages?
Forum Update on Monday, May 27th 2025

detect debug/release in .pro file: message is only correct 2 out of the 3 messages?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 199 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.
  • C Offline
    C Offline
    Cedric-air
    wrote on last edited by
    #1

    I want to do create a .pro file with 3 different situations:
    Linux
    Windows debug
    Windows release

    Therefore I made this .pro file:

    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++11
    CONFIG += qwt
    
    win32: {
        INCLUDEPATH += C:\Qwt-6.2.0\include
        CONFIG(debug, debug|release) {
            message("Windows debug build")
            LIBS += -LC:\Qwt-6.2.0\lib\ -lqwtd
        }
    
        CONFIG(release, debug|release) {
            message("Windows release build")
            LIBS += -LC:\Qwt-6.2.0\lib\ -lqwt
        }
    }
    
    unix: {
        message("Linux build")
        LIBS += -lqwt
    }
    

    Then i set the build to debug in the lower-left corner of qt creator, and choose build-run qmake. Then I see this compile output:

    09:05:54: Running steps for project testbench-maxicontroller-cont...
    09:05:54: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" C:\Users\cedric\Documents\git-werkmap\Maxicontrol_PIC18\testbench\testbench-maxicontroller-cont.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
    Project MESSAGE: Windows debug build
    Project MESSAGE: Windows debug build
    Project MESSAGE: Windows release build
    09:05:55: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
    09:05:55: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f C:/Users/cedric/Documents/git-werkmap/Maxicontrol_PIC18/build-testbench-maxicontroller-cont-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/Makefile qmake_all
    mingw32-make: Nothing to be done for 'qmake_all'.
    09:05:55: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
    09:05:55: Elapsed time: 00:02.
    

    Next I set the build to release in the lower-left corner of qt creator, and choose build-run qmake. Then I see this compile output:

    09:07:35: Running steps for project testbench-maxicontroller-cont...
    09:07:35: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" C:\Users\cedric\Documents\git-werkmap\Maxicontrol_PIC18\testbench\testbench-maxicontroller-cont.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
    Info: creating stash file C:\Users\cedric\Documents\git-werkmap\Maxicontrol_PIC18\build-testbench-maxicontroller-cont-Desktop_Qt_5_15_2_MinGW_64_bit-Release\.qmake.stash
    Project MESSAGE: Windows release build
    Project MESSAGE: Windows release build
    Project MESSAGE: Windows debug build
    09:07:37: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
    09:07:37: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f C:/Users/cedric/Documents/git-werkmap/Maxicontrol_PIC18/build-testbench-maxicontroller-cont-Desktop_Qt_5_15_2_MinGW_64_bit-Release/Makefile qmake_all
    mingw32-make: Nothing to be done for 'qmake_all'.
    09:07:37: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
    09:07:37: Elapsed time: 00:02.
    

    Why is the message generated 3 times?
    Why is the last message incorrect?
    My versions:

    qwt 6.20
    qt 5.15.2
    mingw810_64
    qt creator 10.0.2
    Windows 10.0.19044 build 19044
    
    kkoehneK 1 Reply Last reply
    0
    • C Cedric-air

      I want to do create a .pro file with 3 different situations:
      Linux
      Windows debug
      Windows release

      Therefore I made this .pro file:

      QT       += core gui
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++11
      CONFIG += qwt
      
      win32: {
          INCLUDEPATH += C:\Qwt-6.2.0\include
          CONFIG(debug, debug|release) {
              message("Windows debug build")
              LIBS += -LC:\Qwt-6.2.0\lib\ -lqwtd
          }
      
          CONFIG(release, debug|release) {
              message("Windows release build")
              LIBS += -LC:\Qwt-6.2.0\lib\ -lqwt
          }
      }
      
      unix: {
          message("Linux build")
          LIBS += -lqwt
      }
      

      Then i set the build to debug in the lower-left corner of qt creator, and choose build-run qmake. Then I see this compile output:

      09:05:54: Running steps for project testbench-maxicontroller-cont...
      09:05:54: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" C:\Users\cedric\Documents\git-werkmap\Maxicontrol_PIC18\testbench\testbench-maxicontroller-cont.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
      Project MESSAGE: Windows debug build
      Project MESSAGE: Windows debug build
      Project MESSAGE: Windows release build
      09:05:55: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
      09:05:55: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f C:/Users/cedric/Documents/git-werkmap/Maxicontrol_PIC18/build-testbench-maxicontroller-cont-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/Makefile qmake_all
      mingw32-make: Nothing to be done for 'qmake_all'.
      09:05:55: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
      09:05:55: Elapsed time: 00:02.
      

      Next I set the build to release in the lower-left corner of qt creator, and choose build-run qmake. Then I see this compile output:

      09:07:35: Running steps for project testbench-maxicontroller-cont...
      09:07:35: Starting: "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" C:\Users\cedric\Documents\git-werkmap\Maxicontrol_PIC18\testbench\testbench-maxicontroller-cont.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
      Info: creating stash file C:\Users\cedric\Documents\git-werkmap\Maxicontrol_PIC18\build-testbench-maxicontroller-cont-Desktop_Qt_5_15_2_MinGW_64_bit-Release\.qmake.stash
      Project MESSAGE: Windows release build
      Project MESSAGE: Windows release build
      Project MESSAGE: Windows debug build
      09:07:37: The process "C:\Qt\5.15.2\mingw81_64\bin\qmake.exe" exited normally.
      09:07:37: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -f C:/Users/cedric/Documents/git-werkmap/Maxicontrol_PIC18/build-testbench-maxicontroller-cont-Desktop_Qt_5_15_2_MinGW_64_bit-Release/Makefile qmake_all
      mingw32-make: Nothing to be done for 'qmake_all'.
      09:07:37: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited normally.
      09:07:37: Elapsed time: 00:02.
      

      Why is the message generated 3 times?
      Why is the last message incorrect?
      My versions:

      qwt 6.20
      qt 5.15.2
      mingw810_64
      qt creator 10.0.2
      Windows 10.0.19044 build 19044
      
      kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      Does https://wiki.qt.io/Technical_FAQ#What_does_the_syntax_CONFIG.28debug.2Cdebug.7Crelease.29_mean_.3F_What_does_the_1st_argument_specify_and_similarly_what_is_the_2nd_.3F answer your question?

      Director R&D, The Qt Company

      C 1 Reply Last reply
      2
      • kkoehneK kkoehne

        Does https://wiki.qt.io/Technical_FAQ#What_does_the_syntax_CONFIG.28debug.2Cdebug.7Crelease.29_mean_.3F_What_does_the_1st_argument_specify_and_similarly_what_is_the_2nd_.3F answer your question?

        C Offline
        C Offline
        Cedric-air
        wrote on last edited by
        #3

        @kkoehne Thank you. It tells me qmake runs 3 times to generate the configuration for different situations (debug,release and debug and release), and therefore it gives me three times the messages.

        I didn't expect qmake to run 3 times.

        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