Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Clean before build

    Tools
    2
    7
    7643
    Loading More Posts
    • 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
      sayezz last edited by

      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 Reply Quote 0
      • P
        p-himik last edited by

        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 Reply Quote 0
        • S
          sayezz last edited by

          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 Reply Quote 0
          • P
            p-himik last edited by

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

            1 Reply Last reply Reply Quote 0
            • S
              sayezz last edited by

              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 Reply Quote 0
              • P
                p-himik last edited by

                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 Reply Quote 0
                • S
                  sayezz last edited by

                  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 Reply Quote 0
                  • First post
                    Last post