[SOLVED] Problems linked to Debug mode
So I am working on a school project and I am using libvlc-qt. I had a lot of troubles compiling this lib with mingw and stuff but I finally managed to do it.
My program is working perfectly fine in Release mode but in debug mode, I have the following error :
QWidget: Must construct a QApplication before a QWidget
Invalid parameter passed to C runtime function.
The first line comes from a qDebug from the second line of my main function, the second comes from my program and the third one comes from the lib.
I think that the third line means that libvlc-qt waits for a valid QApplication so that should not be the problem.
Here is my main
int main(int argc, char *argv)
QApplication a(argc, argv);
qDebug() << "HEY";
HttpNetwork http; MasterHandler m(&http); return a.exec();
I don't know if I gave enough details.. Let me know if you guys need more intel.
I am trying to find a solution since a few days.. I read somewhere that it could be because my libvlc-qt is not in debug mode or smthing, so I tried to find a libvlc in debug mode in order to compile it for mingw like I did with the other version but it does not seem to exist.
Sorry for the grammar, I am not native english speaker :)
Pretty the same here. Any help with that ?
Hi and welcome both to devnet,
What version of Qt are you using ? Did you check that libvlc-qt was built with a matching version of Qt (i.e. 4 or 5) ?
I am using the latest version of QT (5.3). I must confess I had a lot of troubles to compile the libvlc-qt library from the original version to a MinGW version so I did not check the compatibility version.. Will in matter in my case?
Sorry, I misread your post, the version doesn't matter in this case since you have built the lib yourself with Qt 5. But for future references, you can't mix libraries using Qt 4 and Qt 5.
So the other question, did you build libvlc-qt in debug and release ?
I build libvlc-qt in release mode because I can't find it in debug.. Is this the issue?
If this is, any idea where I can find the debug mode files in order to compile them aswell?
It's done when configuring before building
This was such a stupid mistake by myself.. I did not know that I could compile in debug mode with the same source files from cmake..
Thanks a lot!