使用基于Qt 5.7.0的Qt Creator 4.0.2,我的应用名称为test
板子型号:i.M6Q with buildroot (Qt 5.9)
问题:
A. 运行qt应用程序时出现以下错误
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
Tools > Options > Build & Run > Compilers
Name :
imx6 buildroot GCC
buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-g++
Tools > Options > Build & Run > Debuggers
Name :
IMX6 buildroot gdb
buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb
Tools > Options > Build & Run > Qt Versions
Version Name :
Qt %{Qt:Version} (buildroot)
buildroot/output/host/usr/bin/qmake
Tools > Options > Build & Run > Kits look like this image
Tools > Options > Devices:
Device test finished successfully.
This is my
main.cpp
#include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }