美文网首页QT5 GUI开发
QtCreator配置交叉编译工具链

QtCreator配置交叉编译工具链

作者: 小桥流水啦啦啦 | 来源:发表于2020-04-07 20:19 被阅读0次

环境:ubuntu16.04桌面环境。

配置交叉编译工具链

说明:使用ubuntu16.04桌面环境,安装QtCreator之后,再利用QtCreator开发QT5 GUI程序,如果编译的程序要运行在arm linux嵌入式系统中,则必须配置交叉编译工具链。

第一步:
source /opt/fsl-imx-x11/4.1.15-2.1.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
第二步:

主要配置内容:调试器、编译器、QT版本。

1、打开工具,点击选项。


image.png

2、选择选项中的构建与运行,概要界面。


image.png

3、构建套件(kit)界面。


image.png

4、Qt Versions界面。


image.png

5、编译器界面。


image.png

6、Debuggers界面。


image.png

7、Qbs界面。


image.png

8、交叉编译例子:

root@imhqq-B360M-D3V:/home/imhqq/share/huqiqiao/QtApp/qtmplay-02# pwd
/home/imhqq/share/huqiqiao/QtApp/qtmplay-02
root@imhqq-B360M-D3V:/home/imhqq/share/huqiqiao/QtApp/qtmplay-02# tree
.
├── main.cpp
├── main.o
├── mainwindow.cpp
├── mainwindow.h
├── mainwindow.h.autosave
├── mainwindow.o
├── mainwindow.ui
├── Makefile
├── moc_mainwindow.cpp
├── moc_mainwindow.o
├── moc_predefs.h
├── qtmplay-02
├── qtmplay-02.pro
├── qtmplay-02.pro.user
└── ui_mainwindow.h

0 directories, 15 files
root@imhqq-B360M-D3V:/home/imhqq/share/huqiqiao/QtApp/qtmplay-02#make clean
rm -f moc_mainwindow.cpp
rm -f ui_mainwindow.h
rm -f main.o mainwindow.o moc_mainwindow.o
rm -f *~ core *.core
root@imhqq-B360M-D3V:/home/imhqq/share/huqiqiao/QtApp/qtmplay-02# qmake
root@imhqq-B360M-D3V:/home/imhqq/share/huqiqiao/QtApp/qtmplay-02# tree
.
├── main.cpp
├── mainwindow.cpp
├── mainwindow.h
├── mainwindow.h.autosave
├── mainwindow.ui
├── Makefile
├── moc_predefs.h
├── qtmplay-02
├── qtmplay-02.pro
└── qtmplay-02.pro.user

0 directories, 10 files

9、上传单板验证。
qtmplay-02文件单独上传单板进行验证即可。

![image.png](https://img.haomeiwen.com/i10686669/243b886a0f8ade14.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

(完)






相关文章

网友评论

    本文标题:QtCreator配置交叉编译工具链

    本文链接:https://www.haomeiwen.com/subject/sqlophtx.html