【问题标题】:QT Creator can not remote run and debugging on i.Mx6 (buildroot)QT Creator 无法在 i.Mx6 (buildroot) 上远程运行和调试
【发布时间】:2018-07-31 14:28:13
【问题描述】:

使用基于 Qt 5.7.0 的 Qt Creator 4.0.2,我的应用名称是 test

板:i.M6Q with buildroot (Qt 5.9)

问题:

A.当我运行 qt app 时显示此错误

EGL library doesn't support Emulator extensions 
Aborted
Application finished with exit code 134.

但是我可以使用./test在board中运行qt app,并且正常显示

B.当我开始调试时显示此错误

The GDB process terminated unexpectedly (exit code 1)

如何修复这些错误?

以下是我设置的:

  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
    
  2. 工具 > 选项 > 构建和运行 > 编译器

    姓名:imx6 buildroot GCC

    buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-g++
    
  3. 工具 > 选项 > 构建和运行 > 调试器

    姓名:IMX6 buildroot gdb

    buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb
    
  4. 工具 > 选项 > 构建和运行 > Qt 版本

    版本名称:Qt %{Qt:Version} (buildroot)

    buildroot/output/host/usr/bin/qmake
    
  5. Tools > Options > Build & Run > Kits look like this image

  6. 工具>选项>设备:

    Device test finished successfully.
    
  7. 这是我的main.cpp

    #include "mainwindow.h"
    #include <QApplication>
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
    
        return a.exec();
    }
    

【问题讨论】:

  • 请不要链接到错误信息的图片;而是将文本添加到您的问题中。
  • @Murphy 感谢您的建议,我将错误消息编辑为文本模式。

标签: qt qt-creator buildroot imx6


【解决方案1】:

这是一个被举报的Qt BUG 问题是构建系统没有选择正确的 eglfs 后端

解决办法是导出:

QT_QPA_EGLFS_INTEGRATION=eglfs_viv 在运行 Qt 应用程序之前,或者

QT_QPA_EGLFS_INTEGRATION=none

【讨论】:

  • 当我今天运行时,它显示另一个错误,即“第 1 行:语法错误:意外“;;”“。并且无法在board中正常运行qt app。
  • 在“通用消息”中显示“buildroot/output/host/mkspecs/features/qmake_use.prf(6): 'take_first' 不是公认的替换功能。项目错误:库 '' 未定义。'
  • @JuliaDing 这些似乎与这篇文章无关的新代码错误。您可以关闭此帖子并询问足够详细的新帖子
  • 我搜索“eglfs_viv”,然后我发现我的板上没有图形加速功能,用于运行“eglfs_viv”的 qt 应用程序。当我输入“# CinematicExperience-demo -platform eglfs”时,它会显示“qt.qpa.egldeviceintegration:无法加载 EGL 设备集成“eglfs_viv”。但是 CinematicExperience-demo 运行正常吗? !我将尝试在 i.Mx6 上打开图形加速,然后再试一次。如果它有效,我会检查你的答案,谢谢。
  • 最初,我在 VMware Ubuntu 上运行。不使用VMware时,qt app远程运行调试成功。
猜你喜欢
  • 2013-05-27
  • 2021-03-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-17
相关资源
最近更新 更多