qt creator linker errors LNK2019 and LNK2001
i try to build with qt5 and qt creator.
get MANY linkererrors some LNK2019 like this:
...error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""class QLoggingCategory const & __cdecl statemachine(void)" (?statemachine@@YAAEBVQLoggingCategory@@XZ)" in Funktion ...
and LNK2001:
... error LNK2001: Nicht aufgelöstes externes Symbol ""class QLoggingCategory const & __cdecl support(void)...
please im new with qt. QLoggingCategory is part of core and core should be known ??
Re: qt creator linker errors LNK2019 and LNK2001
It looks like you are using Microsoft Visual C++ as your build tool. Are you linking against a version of the Qt libraries that was built with this same tool chain (and same version of VC++), and not a Qt version built for minGW?
Also, Qt is built with the flag "/Zc:wchar_t" ("Treat Wchar_t as a built-in type"). Be sure you build all code for your app with the same flag setting.
Re: qt creator linker errors 2001/2019
thank you for answer. yes i use msvc. qt is opensourceversion. i want to produce opensourceapp. the name of kit i use is Desktop Qt 5.12.10 MSVC2017 64bit.
i solved the qlogging-errors with comments cause i dont need the logs really.
now i have other errors 2001/2019: Nicht aufgelöstes externes Symbol ""public: static struct QMetaObject ... whats that please?
Re: qt creator linker errors 2001/2019
QMetaObject linking errors are most likely due to not compiling or linking the automatically-generated moc_*.cpp file that is produced by the Qt MOC compiler.
If you are using Qt Creator, you may need to re-run qmake.
Re: qt creator linker errors 2001/2019
yes i use qt creator (but i tried with Visual Studio and QtTools too same result). i cleaned project, i deleted debug/release folder, rerun qmake (in menu build) again but always the same qmetaobject linkererrors. and all .obj and mocfiles seem to be there.
Re: qt creator linker errors 2001/2019
Do you have a Q_OBJECT declaration in all classes deriving from QObject / QWidget?