Unsolved Error building sample application Qt 5.14, Visual stuido 2019
-
Hello all,
I am trying to build my project on visual studio using msvc2017- 64 bit compiler getting the following errors:
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z)error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z)error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z)
: error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z): error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z): error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z)
: error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z): error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z): error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QMetaObject::connectSlotsByName(class QObject *)" (_imp?connectSlotsByName@QMetaObject@@SAXPEAVQObject@@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)
: error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)
j : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)j : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)j : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)
: error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QMetaObject::Connection::~Connection(void)" (_imp??1Connection@QMetaObject@@QEAA@XZ)
rror LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)rror LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)rror LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)
: error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)
: error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ): error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QString __cdecl QObject::objectName(void)const " (_imp?objectName@QObject@@QEBA?AVQString@@XZ) -
You don't link against QtCore.
-
@Christian-Ehrlicher : can u please explain in detail.
The compiler is not giving any error have included all the header files. :) -
@Kira said in Error building sample application Qt 5.14, Visual stuido 2019:
can u please explain in detail.
What should I explain here? If you want to use QtCore, you have to link against it. If you're using pro-files than this is done automatically. If you're using something else you have to do it on your own.
-
@Christian-Ehrlicher : Actually when i was using msvc2015 along with visual studio everything was working fine. So i have followed the same process here for msvc 2017
-
@Kira said in Error building sample application Qt 5.14, Visual stuido 2019:
So i have followed the same process here for msvc 2017
Which process? What buildsystem do you use? What Qt version do you use, ... ? It would be really nice when you can provide the information without we need to ask every time - you're here long enough to know what we need.
-
@Christian-Ehrlicher said in Error building sample application Qt 5.14, Visual stuido 2019:
here long enough to know what we need.
Sorry for that.
Here are the details of the implementation:
I am using Qt 5.14 and using the msvc-2017 compiler.
Below are the snaps of the settings:in case of anything else required.
General settings:
of c/C++