Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

What is the obj file that is created during the build?



  • Hi.
    What is the .obj file that is created at build time?
    I was curious because it was created every time.

    Deleting it does not have any particular effect on the execution of the application.
    Is it better not to delete it?
    If it is something that can be removed, is there a way to prevent it from being generated at build time?


  • Lifetime Qt Champion

    @Knj-Tkm *.obj files are objects files created by compiler for every cpp file:

    some.cpp -> some.obj
    

    These files are then linked by linker into the executable or library. Afterwards they are not needed. But there is really no need to delete them manually. If you will delete them your build will take longer as every cpp file needs to be compiled again even if nothing was changed there. When deploying your app no need to deploy object files.


  • Lifetime Qt Champion

    @Knj-Tkm *.obj files are objects files created by compiler for every cpp file:

    some.cpp -> some.obj
    

    These files are then linked by linker into the executable or library. Afterwards they are not needed. But there is really no need to delete them manually. If you will delete them your build will take longer as every cpp file needs to be compiled again even if nothing was changed there. When deploying your app no need to deploy object files.



  • @jsulm
    OK I know, thanks.


Log in to reply