I have been programming in c++ for about six months now. Just recently i started to make a blackjack simulator in QT creator, which means i am very new to the QT environment. I have created a few classes i thought was needed etc. Everything works out fine until i try to create a class object in my mainWindow.h!
So the problem pops up when im trying to create a Deals object. I also create a new Deals(); in the .cpp file ofc.
The error message i get is called LNK2019. I have been googling around for a while to understand what it actually means and how i can understand the error statements.
In this specific case the errorcode looks like this:
mainblackjackmainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl Deals::Deals(void)" (??0Deals@@QEAA@XZ) referenced in function "public: __cdecl MainBlackJackMainWindow::MainBlackJackMainWindow(class QWidget *)" (??0MainBlackJackMainWindow@@QEAA@PEAVQWidget@@@Z)
how should i read this to be able to understand it? And if u have any ideas or tips on how to solve this i would be glad.
In the function MainBlackJackMainWindow::MainBlackJackMainWindow(QWidget*) (the constructor, I'd guess), you are trying to default construct a Deals object (hence the reference to Deals::Deals()) but the linker can't find a definition for it. I'd suspect you've written the prototype but not actually supplied the implementation anywhere (or are at least forgetting to link it).