使用基于 Qt 5.7.0 的 Qt Creator 4.0.2,我的应用程序名称是test
主板:带有 buildroot 的 i.M6Q (Qt 5.9)
问题:
A. 当我运行 qt app 时显示此错误
EGL library doesn't support Emulator extensions
Aborted
Application finished with exit code 134.
但我可以使用 ./test 在板上运行 qt 应用程序,并且它显示正常
B. 当我开始调试时显示此错误
The GDB process terminated unexpectedly (exit code 1)
如何修复这些错误?
以下是我所设置的:
-
test.pro
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = test
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
target.path = /root/test
INSTALLS += target
-
工具 > 选项 > 构建和运行 > 编译器
Name : imx6 buildroot GCC
buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-g++
-
工具 > 选项 > 构建和运行 > 调试器
Name : IMX6 buildroot gdb
buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb
-
工具 > 选项 > 构建和运行 > Qt 版本
版本名称:Qt %{Qt:Version} (buildroot)
buildroot/output/host/usr/bin/qmake
工具 > 选项 > 构建和运行 > 套件看起来像这个图片 https://i.stack.imgur.com/Eajs9.jpg
-
工具 > 选项 > 设备:
Device test finished successfully.
-
这是我的main.cpp
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
这是一篇报道Qt BUG https://bugreports.qt.io/browse/QTBUG-61156问题是构建系统没有选择正确的eglfs后端
解决方案是导出:
QT_QPA_EGLFS_INTEGRATION=eglfs_viv
在运行 Qt 应用程序之前,或者
QT_QPA_EGLFS_INTEGRATION=none
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)