QT编译出现如下问题:
In function `Z5qMainiPPc':
undefined reference to `_imp___ZN12QApplicationC1ERiPPci'
undefined reference to `_imp___ZN12QApplication4execEv'
undefined reference to `_imp___ZN12QApplicationD1Ev'
undefined reference to `_imp___ZN12QApplicationD1Ev'
ld returned 1 exit status
解决方法:
在 pro 文件中添加下面这段内容:
QT += gui widgets core