In my project I'm using QImage to save a generated picture, but when I call
QImage image(width, height, QImage::Format_RGB32);
the visual studio compiler is giving me linker errors:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QImage::~QImage(void)" (__imp_??1QImage@@UAE@XZ) referenced in function "void __cdecl lightTracer(void)" (?lightTracer@@YAXXZ)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QImage::QImage(int,int,enum QImage::Format)" (__imp_??0QImage@@QAE@HHW4Format@0@@Z) referenced in function "void __cdecl lightTracer(void)" (?lightTracer@@YAXXZ)
But if I replace the code above with just a:
QImage image();
I do not get any linker errors, and compiles fine.
What's wrong here? :(
Update: To try and make sure Qt was functional, I tried making a QString:
QString s("hello world");
and this worked properly.