c++qtwindows-10qt-creatorout-of-source

Linker error with out of source build in Qt 5


I am having problems linking a test project; this is the error:

DataGUI.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl GuiUtilities::TreeModel::TreeModel(class QObject *)" (??0TreeModel@GuiUtilities@@QEAA@PEAVQObject@@@Z) referenced in function "public: __cdecl GuiUtilities::DataGUI::DataGUI(class QWidget *)" (??0DataGUI@GuiUtilities@@QEAA@PEAVQWidget@@@Z)

File not found: DataGUI.obj

The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project DataGUI (kit: Desktop Qt 5.8.0 MSVC2015_64bit)
The kit Desktop Qt 5.8.0 MSVC2015_64bit has configuration issues which might be the root cause for this problem.

The object file 'DataGUI.obj' does exist.

I am doing an out of source build, and so:

./Project/sources
./Project/*.pro
./Build/build-Project-.../Debug/DataGUI.obj

With the exact same configuration, I have already built other Qt projects successfully.


Solution

  • This issue partially fixed itself, but I am leaving this question for reference in case the same thing should happen to others.

    This is the sequence of events:

    Now I am fixing the compile time errors...