当前位置:网站首页>QT5.5.1桌面版安装配置过程中的疑难杂症处理(配置ARM编译套件)
QT5.5.1桌面版安装配置过程中的疑难杂症处理(配置ARM编译套件)
2022-06-27 15:34:00 【华为云】
记录在红帽6.3系统下安装QT5.5.1环境时,编译过程中,配置编译套件的过程中遇到各种问题的解决办法。介绍了如何配置Android编译环境、嵌入式ARM的编译环境等。
QT5.5.1桌面版安装配置过程中的疑难杂症处理(配置ARM编译套件)
QT 5.5.1红帽子编译
红帽子6.3安装QT5.5.1编译程序问题解决:
安装包命令:rpm -ivh xxxxx.rpm
解决问题1:构建arm编译器套件。
出错原因:选择arm编译器路径时软件会崩溃。
解决办法:手动填写arm编译器g++的路径即可。
好处:通过QT IDE软件即可直接编译出开发板可以直接运行的程序。
.png)





将可执行文件手动拷贝到开发板即可运行!
解决问题2:编译PC桌面版QT程序报错。
错误问题:
error: cannot find -lGL
error: collect2: ld returned 1 exit status
出错原因:缺少以下3个库
mesa-libGL-devel
mesa-libGLU-devel
freeglut-devel
解决办法:红帽子iso虚拟光盘中自带有安装包,直接进入到/media/RHEL_6.3 i386 Disc 1/Packages目录下进行安装即可。
注意:需要先点击虚拟机右下角将iso虚拟光盘挂载到Linux系统里。
安装步骤:
通过文件管理器进入到Packages目录,找到对应安装包,然后鼠标右键安装即可。







以上安装包安装成功之后,就可以直接运行QT程序:

解决问题3:嵌入式开发板qt5字体放置问题 。
问题描述: qt5字体必须放在移植时候指定的安装目录中才可以找到
解决办法:
export QT_QPA_FONTDIR=$QTDIR/lib/fonts 设置环境变量,解决字体路径问题 。
关键是前面加了export关键字,否则设置不起作用。
解决问题4:红帽子QT5.5 android配置

注意:搭建安卓环境需要下载Android版本的QT。


解决问题5:报错gtk库链接错误
将QT安装目录下的libqgtk2.so库删除掉即可。
示例:
/opt/Qt5.5.1.1/5.5/gcc/plugins/platformthemes/libqgtk2.so |
解决后这个问题后,QT程序才可以打开本地文件系统,浏览文件路径。否则遇到需要操作文件系统,或者需要选择路径时,程序就会崩溃掉。

解决后以下代码才可正常运行:
void Widget::on_pushButton_clicked() { QFileDialog::getOpenFileName(this, tr("Open File"), "/", tr("Images (*.png *.xpm *.jpg)")); } |
解决问题6:
QT5.5.1在红帽子中只要点击涉及到浏览文件系统相关选项时,软件将会崩溃。
错误提示:
./qtcreator: symbol lookup error: /opt/Qt5.5.1.1/Tools/QtCreator/bin/plugins/platformthemes/libqgtk2.so: undefined symbol: gtk_dialog_get_widget_for_response |
问题原因:QT自带的GTK库版本不兼容。
解决办法:将QT安装目录下的libqgtk2.so删除掉即可解决问题。
解决步骤:
rm /opt/Qt5.5.1.1/Tools/QtCreator/bin/plugins/platformthemes/libqgtk2.so |
注意:红色部分是自己QT的安装路径。


边栏推荐
- Pisa-Proxy 之 SQL 解析实践
- QT audio playback upgrade (7)
- 保留有效位数;保留小数点后n位;
- The array of C language is a parameter to pass a pointer
- Julia constructs diagonal matrix
- In the Alibaba cloud experiment, if the k8s forwards to port 3306 and the MySQL client is turned on, it will terminate abnormally. What is the reason?
- 洛谷入门1【顺序结构】题单题解
- Keep valid digits; Keep n digits after the decimal point;
- The latest development course of grain college in 2022: 8 - foreground login function
- Gin general logging Middleware
猜你喜欢

A distribution fission activity is more than just a circle of friends!

Keep valid digits; Keep n digits after the decimal point;

Centos8 PostgreSQL initialization error: initdb: error: invalid locale settings; check LANG and LC_* environment

Open source 23 things shardingsphere and database mesh have to say

Let's talk about the process of ES Indexing Documents

Sigkdd22 | graph generalization framework of graph neural network under the paradigm of "pre training, prompting and fine tuning"

基于 Nebula Graph 构建百亿关系知识图谱实践

28 object method extension

开源二三事|ShardingSphere 与 Database Mesh 之间不得不说的那些事
![Beginner level Luogu 2 [branch structure] problem list solution](/img/53/d7bf659f7e1047db4676c9a01fcb42.png)
Beginner level Luogu 2 [branch structure] problem list solution
随机推荐
Design of electronic calculator system based on FPGA (with code)
Mode setting of pulseaudio (21)
防火墙基础之源NAT地址转换和服务器映射web页面配置
利用Redis实现订单30分钟自动取消
Does polardb-x currently not support self-made database service Das?
Gin general logging Middleware
Principle Comparison and analysis of mechanical hard disk and SSD solid state disk
The interview lasted for half a year. Last month, I successfully got Alibaba p7offer. It was all because I chewed the latest interview questions in 2020!
Distributed session solution
Leetcode daily practice (main elements)
鸿蒙发力!HDD杭州站·线下沙龙邀您共建生态
Does polardb-x open source support mysql5.7?
Nemo of pulseaudio (22)
关于TensorFlow使用GPU加速
Introduce you to ldbc SNB, a powerful tool for database performance and scenario testing
洛谷入门1【顺序结构】题单题解
E modulenotfounderror: no module named 'psychopg2' (resolved)
[kotlin] the next day
FPGA based analog I ² C protocol system design (with main code)
What is the open source compatibility of the current version of polardb-x? mysql8?