Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Qt Creator tool to compile Qt Project in linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to compile Qt project with Qt Creator tools in linux". In daily operation, I believe that many people have doubts about how to use Qt Creator tools to compile Qt projects in linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to compile Qt projects with Qt Creator tools in linux". Next, please follow the editor to study!

Compiling Qt Project based on Qt Creator tool

Execute the following command to load the Linux SDK environment variable and start Qt Creator (take version 4.2.0 as an example).

Host#source / home/tronlong/SDK/environment-setup-aarch74-poky-linux

Host#qtcreator

After launching the Qt Creator tool, click the menu bar "Tools-> Options..." .

Click "Build & Run" to open the configuration selection page.

2.1 configure debuggers

Click "Debuggers-> Add-> Browse..." Select the platform GDB, and then click Open to confirm. The specific path is:

/ home/Tronlong/SDK/sysroots/x86_64-pokysdk-linux/usr/bin/aarch74-poky-linux/aarch74-poky-linux-gdb

Once selected, change Name to "IMX8-Debugger", and then click Apply, as shown in the following figure.

2.2 configure cross-compilation tool chain

Click "Compilers-> Add-> GCC-> Browse..." Select aarch74-poky-linux-g++, in the platform cross-compilation tool chain and click Open to confirm. The specific path is:

/ home/tronlong/SDK/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++

After selecting, change Name to IMX8-GCC, and then click Apply, as shown in the following figure.

2.3 configure Qt Versions

Click "Qt Versions-> Add", select the platform qmake, and then click Open to confirm. The specific path is:

/ home/Tronlong/SDK/sysroots/x86_64-arago-linux/usr/bin/qt5/qmake

Once selected, change version name to "IMX8-qt5" and click Apply, as shown in the following figure.

2.4 configure Kits

Click "Kits-> Add", change Name to IMX8, refer to the following table to configure the options, click Apply, and then click OK to complete the configuration, as shown in the following figure.

2.5 compile the Qt project

Click "Open Project".

Select the .pro file in the Qt project source directory and click Open.

Check IMX8 platform Kits, and click "Configure project" to configure the project, as shown in the following figure.

Right-click the Qt project and click Build to compile the Qt project to generate an arm-side Qt program image that can run normally on the evaluation board, as shown in the following figure.

At this point, the study on "how to compile a Qt project with Qt Creator tools in linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report