[SOLVED] Problems linked to Debug mode
-
Hey,
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 :bq. HEY
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
@#include <QApplication>
#include "httpnetwork.h"
#include "masterhandler.h"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 :)
-
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) ?
-
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 ?
-
It's done when configuring before building