环境: PC机是Ubuntu10.04;ARM用S3C2440;
在qt.nokia.com下载的qt-everywhere-opensource-src-4.6.3
友善之臂下载的交叉编译工具arm-linux-gcc-4.4.3和ARM板NFS启动工具rootfs_qtopia_qt4_20100816
GDB调试工具gdb-7.1 (Ubuntu)
用最简单的QT程序HelloWorld,代码如下:
# include <QDebug>
# include <qwindowsystem_qws.h>
# include <QLabel>
int main(int argc, char * argv[])
{
qDebug() << "Hello! Hello!";
QApplication app(argc, argv, QApplication::GuiServer);
qDebug() << "Application starts.....";
QLabel hello("Hello World!");
hello.resize(480, 320);
hello.show();
return app.exec();
}
在板上运行后显示:
Hello! Hello!
Segmentation fault
用gdb的backtrace后显示:
0x40198024 in QLinuxFbScreen::useOffscreen()() from /..../libQtGui.so.4
0x4019aadc in QLinuxFbScreen::connect(QString const&) () from /..../libQtGui.so.4
无论运行什么程序,包括demo的都出现同样的结果。
大家有没什么建议啊?