简体   繁体   中英

QWidget: Must construct a QApplication before a QPaintDevice in VS Release mode

When I use VS2015 with Qt to run program in Release mode, I receive an error:

Program:E:\\qt-everywhere-opensource-src-4.8.3\\bin\\QtCored4.dll
Module:4.8.3
File:global\\qglobal.cpp
Line:2246
QWidget: Must construct a QApplication before a QPaintDevice
(Press Retry to debug the application)

Moreover, the program should link QtCore4.dll rather than QtCored4.dll, but I don't know why the program alway linked QtCored4.dll.

However, in debug mode the program runs just fine.

The code is as follows:

QApplication a(argc, argv);  
GPURenderingApp w;  
w.showMaximized();  
return a.exec();

问题已解决,我需要链接QVTK.dll的发行版而不是QVTK.dll的调试版

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM