明远智睿技术论坛

 找回密码
 立即注册
搜索
查看: 2974|回复: 0

RK3399 UBUNTU系统跑QT程序

[复制链接]

36

主题

745

帖子

2872

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2872
发表于 2020-9-23 17:51:43 | 显示全部楼层 |阅读模式
开发板型号:MY-RK3999-EK314
内核版本:linux-4.4
源码版本:myrk3399_linux.tar.bz2
系统类型:ubuntu


原因:想在ubuntu上测试一下QT程序
方法如下:


1.复制一下QT demo源码Uart_Test.zip
$ unzip Uart_Test.zip


2.配置和编译(注意:如果报错,需要修改Uart_Test.pro,增加greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
$ sudo apt-get install g++
$ cd Uart_Test
myzr@localhost:~/Uart_Test$ qmake -project
myzr@localhost:~/Uart_Test$ qmake
myzr@localhost:~/Uart_Test$ make
myzr@localhost:~/Uart_Test$ ls
main.cpp  Makefile        moc_widget.o  Uart_Test.pro  widget.cpp  widget.o
main.o    moc_widget.cpp  Uart_Test     ui_widget.h    widget.h    widget.ui

3.运行程序
myzr@localhost:~/Uart_Test$ export DISPLAY=':0.0'myzr@localhost:~/Uart_Test$ ./Uart_Test






回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|明远智睿  

GMT+8, 2024-3-28 23:08 , Processed in 0.064229 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表