读书人

QT5.0下的交叉编译有关问题

发布时间: 2013-07-11 15:38:46 作者: rapoo

QT5.0下的交叉编译问题
写好的QT界面程序 在QTcreator下编译都可以 没有错误
qmake -project ,qmake都可以生成.pro和Makefile
但是在make时出现错误,没有QMainWindow文件 ,求大神解决 Qt5 交叉编译
[解决办法]
在pro文件上加上greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
[解决办法]
官方文档上说明了,如果是自己qmake的话,得加上qt += widgets:
You could also use qmake's -project option to generate the .pro file. Although, in that case, you have to remember to add the line QT += widgets to the generated file in order to link against the Qt Widgets Module.
[解决办法]

引用:
在pro文件上加上greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

+1

读书人网 >QT开发

热点推荐