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. QtCreator Project settings create debug and release folders

QtCreator Project settings create debug and release folders

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
10 Posts 5 Posters 3.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.
  • T Offline
    T Offline
    toran
    wrote on last edited by
    #1

    I have separate folders for Debug and Release in my Project settings. What is confusing is that in each folder qtCreator creates both "debug" and "release" subfolders(for example Project-debug/debug and Project-debug/release). Depending on the build mode, i.e debug or release, one of these subfolders is filled with obj and output files, leaving another one empty. For example, building in Debug mode creates Debug\debug with output files and Debug\release empty. My pro file does not do anything to create these subfolder.

    Why these subfolders even exist in the project build directory?

    jsulmJ 1 Reply Last reply
    0
    • T toran

      I have separate folders for Debug and Release in my Project settings. What is confusing is that in each folder qtCreator creates both "debug" and "release" subfolders(for example Project-debug/debug and Project-debug/release). Depending on the build mode, i.e debug or release, one of these subfolders is filled with obj and output files, leaving another one empty. For example, building in Debug mode creates Debug\debug with output files and Debug\release empty. My pro file does not do anything to create these subfolder.

      Why these subfolders even exist in the project build directory?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @toran "I have separate folders for Debug and Release in my Project settings" - can you explain a bit what they are used for?
      Usually you do not have to care about debug and release folders - they are created for you. Can you show your pro file?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • T Offline
        T Offline
        toran
        wrote on last edited by
        #3

        "can you explain a bit what they are used for": well, sort of. QtCreator creates the default directory for a project. For example, creating console application "creatorFolderTest" in c:\test produces following setting:

        for "Debug" build configuration: C:\test\build-creatorFolderTest-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug

        for "Release" build configuration: C:\test\build-creatorFolderTest-Desktop_Qt_5_7_0_MSVC2015_32bit-Release

        I did not edit .pro file in any way, just ran New Project wizard.

        Now, when I build, say, in Debug Mode, it creates "debug" and "release" folders under C:\test\build-creatorFolderTest-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug.
        Please note that I did not yet build "Release" mode.

        The pro file created by QtCreator is:
        QT += core
        QT -= gui

        CONFIG += c++11

        TARGET = creatorFolderTest
        CONFIG += console
        CONFIG -= app_bundle

        TEMPLATE = app

        SOURCES += main.cpp

        mrjjM 1 Reply Last reply
        0
        • T toran

          "can you explain a bit what they are used for": well, sort of. QtCreator creates the default directory for a project. For example, creating console application "creatorFolderTest" in c:\test produces following setting:

          for "Debug" build configuration: C:\test\build-creatorFolderTest-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug

          for "Release" build configuration: C:\test\build-creatorFolderTest-Desktop_Qt_5_7_0_MSVC2015_32bit-Release

          I did not edit .pro file in any way, just ran New Project wizard.

          Now, when I build, say, in Debug Mode, it creates "debug" and "release" folders under C:\test\build-creatorFolderTest-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug.
          Please note that I did not yet build "Release" mode.

          The pro file created by QtCreator is:
          QT += core
          QT -= gui

          CONFIG += c++11

          TARGET = creatorFolderTest
          CONFIG += console
          CONFIG -= app_bundle

          TEMPLATE = app

          SOURCES += main.cpp

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @toran
          Hi
          Just to make sure im not misunderstanding you.
          ** You are wondering ( as others before you) that when you Select a Debug build u also get release folder AND reverse. ** Yes?

          T 1 Reply Last reply
          1
          • mrjjM mrjj

            @toran
            Hi
            Just to make sure im not misunderstanding you.
            ** You are wondering ( as others before you) that when you Select a Debug build u also get release folder AND reverse. ** Yes?

            T Offline
            T Offline
            toran
            wrote on last edited by
            #5

            @mrjj Oh, my... Yes, that's exactly my question. I'll appreciate it if you can provide me with the link to the answer :).

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Well I dont know the answer yet :)
              I also wondered why. :)

              I feel this time we are lucky and someone will tell us the truth.
              It's out there, I can feel it.

              K 1 Reply Last reply
              0
              • mrjjM mrjj

                Well I dont know the answer yet :)
                I also wondered why. :)

                I feel this time we are lucky and someone will tell us the truth.
                It's out there, I can feel it.

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @mrjj @toran

                IIRC it has to do because there are different tools involved. For creator it has been decided to allow for shadow builds for all generated information. Those shadow builds are separated for debug and release. However, the file structure internally stems from a stripped down version of qmake used within creator. qmake would generate those folders in the decided location as will the stripped down version in creator.

                For some reason the shadow builds have to be already separated and cannot simply use the use the qmake structure.

                I believe there has been a post or better an answer to a post by @tobias-hunger explaining that a couple of years back. The introduction of shadow builds goes back to tobias as far as I know. However, I was not able to dig out his answer by the search functionality here in the forum.

                Do not nail me to explanation above. Completely out of memory on what I understood at that time.

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

                1 Reply Last reply
                4
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Well good enough explanation for me. Thank you.
                  I absolutely adore shadow build so it's a small price to pay. :)

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

                    Hi,

                    Also, IIRC, that's how VS works thus the duplicated unused folders.

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

                    K 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Hi,

                      Also, IIRC, that's how VS works thus the duplicated unused folders.

                      K Offline
                      K Offline
                      koahnig
                      wrote on last edited by
                      #10

                      @SGaist

                      Isn't that because of vsaddins?
                      Probably the stripped stems from there somehow.

                      Unfortuntely Tobias message vanished in the forum's nirwana.

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

                      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