Combined debug and release compilation

154 Views Asked by At

I have a Qt project where I compile 2 DLL libraries and 1 EXE executable. The EXE file uses the DLL's.

When I compile the DLL's in debug mode and the EXE in release mode, there is a problem; the application doesn't start and instead says that the QWidget object must be created when QApllication object is already created.

When all projects are built in release mode, there's no problem.

Why do I have this error? What difference is there between debug and release mode that causes the problem?

Here is the code of .exe:

int main(int argc, char *argv[])
{
    QApplication BlocksManager(argc, argv);
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));

    //LoginDialog authWidget;
    //if (authWidget.exec() != QDialog::Accepted)
        //return 0;

    Leos *initOb = new Leos;
    createTrees(*initOb);

    BlocksWidget wgt(initOb, NULL);
    delete initOb;
    return BlocksManager.exec();
}
0

There are 0 best solutions below