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

What happens in the IDE to break the build?



  • I've experience the same problem in several projects in Qt Creator over several versions including the latest.

    It seems that for no good reason a build can be broken without any source code changes.

    A typical error that comes up during build:

        undefined reference to `DialogCardPolling::on_LabelContactStatus_windowIconTextChanged(QString const&)'
    

    Nothing has been changed in this source. I've found that re-opening the .ui file and saving can fix these, but why does it keep occurring?



  • Hi @SPlatten

    I guess you are facing a problem of different timestamp between the Object and Source file.

    https://www.cprogramming.com/compilingandlinking.html

    In short, the compiler does not need to recompile every files of your project. Instead of that, it compare the timestamp between each object and source files and if the source file is newer than object so it should be recompiled and relinked otherwise it will skip.

    But when you edit your file on one machine and compile on another machine, it may happen that the source file has a timestamp older than the object file. It is a classical problem of distributed editor



  • I'm working on a virtual machine, the project that I encountered the problem with hadn't been modified, but when I recompile it started reporting build errors.

    I then restored the build from a backup and all is now ok again.


Log in to reply