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. Qt build folder has sub folders for debug and release
Forum Updated to NodeBB v4.3 + New Features

Qt build folder has sub folders for debug and release

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 5 Posters 1.2k Views 2 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    The project I'm working on has an odd folder structure, the build directory is set as follows:

    C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug
    

    Inside this folder there are also sub-folders:

    debug
    release
    

    I'm not sure how or why its been done this way on other projects these are not present and the objects and executable is built in the root of the build folder.

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    1
    • SPlattenS SPlatten

      But there are already separate build folders for each:

          C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug
          C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Release
      

      Each of these has sub-folders called debug and release.

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

      @SPlatten Yes, this is on Windows. I'm not sure why, but it's "normal"

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

      1 Reply Last reply
      1
      • SPlattenS SPlatten

        The project I'm working on has an odd folder structure, the build directory is set as follows:

        C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug
        

        Inside this folder there are also sub-folders:

        debug
        release
        

        I'm not sure how or why its been done this way on other projects these are not present and the objects and executable is built in the root of the build folder.

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

        @SPlatten This is actually default behaviour on Windows.
        The reason for "debug" and "release" subfolders is simple: to not to mix debug and release build artefacts.

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

        1 Reply Last reply
        2
        • SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #3

          But there are already separate build folders for each:

              C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug
              C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Release
          

          Each of these has sub-folders called debug and release.

          Kind Regards,
          Sy

          jsulmJ aha_1980A 2 Replies Last reply
          1
          • SPlattenS SPlatten

            But there are already separate build folders for each:

                C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug
                C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Release
            

            Each of these has sub-folders called debug and release.

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

            @SPlatten Yes, this is on Windows. I'm not sure why, but it's "normal"

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

            1 Reply Last reply
            1
            • SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by
              #5

              Seems very odd.

              Kind Regards,
              Sy

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

                Hi,

                That comes from how Visual Studio works. Qt Creator handles out of source builds on all platform the same because the toolchains usually works from within the folder you call them in.

                What you see here is Visual Studio doing the same, except that its own behaviour is to create separate build/release folder for the reasons @jsulm wrote and continue the process in the one corresponding to the build type going on.

                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
                2
                • SPlattenS SPlatten

                  But there are already separate build folders for each:

                      C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug
                      C:\Users\u49100\Documents\build-PSU-Desktop_Qt_5_8_0_MSVC2013_32bit-Release
                  

                  Each of these has sub-folders called debug and release.

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  @SPlatten In addition to what @jsulm and @SGaist said, you can turn that "feature" off with CONFIG-=debug_and_release. In that case you have to make sure to not mix debug and release artifacts, which is perfectly done by shadow-build folders.

                  Regards

                  Qt has to stay free or it will die.

                  1 Reply Last reply
                  4
                  • SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by
                    #8

                    Thats exactly what I was looking for, thank you!

                    Kind Regards,
                    Sy

                    1 Reply Last reply
                    3
                    • G Offline
                      G Offline
                      giao
                      wrote on last edited by
                      #9

                      I still don't understand Why does qt creater have Debug and release folders in the Debug\ folder?
                      I have tried vs2022 Debug and release folders in the X64.
                      The working directory of a c program is actually on the upper level of the exe directory, too strange!

                      you can tryFILE* file = fopen("test.txt", "r");,test.txt
                      you will found that test.txt should be placed under Debug\, not Debug\Debug\

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

                        Hi and welcome to devnet,

                        I think the comment I posted above is still valid.

                        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