1
我有問題鏈接測試項目;這是錯誤:鏈接器錯誤與源內部構建在Qt 5
DataGUI.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl GuiUtilities::TreeModel::TreeModel(class QObject *)" ([email protected]@@[email protected]@@@Z) referenced in function "public: __cdecl GuiUtilities::DataGUI::DataGUI(class QWidget *)" ([email protected]@@[email protected]@@@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.
目標文件'DataGUI.obj'確實存在。
我做一個徹頭徹尾的源碼編譯的,因此:
./Project/sources
./Project/*.pro
./Build/build-Project-.../Debug/DataGUI.obj
具有完全相同的配置,我已經建立了其他的Qt項目成功。
是否錯誤依然後您「清除」的項目堅持,並重新構建它? – Danyright
@Danyright:是的,我一直得到同樣的錯誤。 – Pietro
好的。然後我會檢查你的代碼。有沒有可能你不能正確鏈接(#include)TreeModel類?你能發佈DataGUI的代碼嗎? – Danyright