Clean before build



  • 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.



  • 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.



  • 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.



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



  • 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 ;)



  • 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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.