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. Clean before build
Qt 6.11 is out! See what's new in the release blog

Clean before build

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 2 Posters 9.8k 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.
  • S Offline
    S Offline
    sayezz
    wrote on last edited by
    #1

    Hey,

    i would like to clean my project before build it.
    i can call "make clean" an than "make" but i would like to press only one button.

    Is there a parameter in qmake that tells make first to run clean and thanbuild the project?
    I am working with Eclipse.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on last edited by
      #2

      According to documentation the only thing you can use in this case is "system(command)":http://qt-project.org/doc/qt-4.8/qmake-function-reference.html#system-command function.
      Anyway, why do you need to clean your project before build? I can't imagine any reason for it.
      If you need to clean your project only once, there is a button for this in the menu.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sayezz
        wrote on last edited by
        #3

        Thanks for your reply. Ich want to clean it before build because if there are existing binaries and i build the project, the old binaries will be not override.
        One concret (and stupid/nonesense) Example that i had:
        I have a library that does not work (segementation fault). I do not need the library but when i include it in my LIBS, my program crashes.

        I build the program without the library, everything works. I add the library and build the program again, everything works. I delete the old binaries and build the program again -> segmentation fault.

        My aim is just to be sure that the new build overriedes the old binaries so i start always the freshest build.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p-himik
          wrote on last edited by
          #4

          As I said: Main menu -> Build -> Clean all sequence will do the job.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sayezz
            wrote on last edited by
            #5

            yeah, but then i have to do this procedure everytime i build my project. I thought there is a easy way to click once and it does all the points i need.

            Of course it works, when i do it manuelly, but that is not fancy ;)

            1 Reply Last reply
            0
            • P Offline
              P Offline
              p-himik
              wrote on last edited by
              #6

              As I know there is no any common way to do it since your situation with libraries not overwritten is not common.
              make (or nmake or some other *make ) should delete binaries older than object files while compiling.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sayezz
                wrote on last edited by
                #7

                you are right, as soon as i change somethin in one on my files, everything works correctly. I can work with that. Thanks ;)

                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