Embedded Linux QT Development (ii)--QT development environment Construction

Source: Internet
Author: User

embedded linux qt Development (ii)--qt Development environment Construction First, Windows system QT development environment Building

Operating System: Windows 7

QT creator:qt-creator-win-opensource-2.4.1

QT Sdk:qt-win-opensource-4.7.4-mingw

1. Installing QT Creator

Click qt-creator-win-opensource-2.4.1 Source to install the program.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/88/38/wKiom1fr1ZTxu-hPAABQCEg2hP8316.png "title=" Picture 1.png "alt=" Wkiom1fr1ztxu-hpaabqceg2hp8316.png "/>

2. Installing the QT SDK

Click Qt-win-opensource-4.7.4-mingw Source to install the program.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/88/38/wKiom1fr1bzC83miAABsTOEu1DY310.png "title=" Picture 2.png "alt=" Wkiom1fr1bzc83miaabstoeu1dy310.png "/>

Select the MinGW folder and look in the QT creator installation directory

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/88/34/wKioL1fr1dnANygyAABO-5xKhM4450.png "title=" Picture 3.png "alt=" Wkiol1fr1dnanygyaabo-5xkhm4450.png "/>

3. environment variable Settings

because Qt Creator and QT SDK are installed separately, so you need to set environment variables to associate them.

A, right click on the desktop computer icon Select Properties, enter the System property settings, select Advanced system settings.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/88/34/wKioL1fr1fmhY75nAABlZF_10O8628.png "title=" Picture 4.png "alt=" Wkiol1fr1fmhy75naablzf_10o8628.png "/>

B, select the Advanced menu, click the environment variable option in the lower right corner to enter the environment variable settings

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/88/38/wKiom1fr1hbAgq86AABfXmbTGNE996.png "title=" Picture 5.png "alt=" Wkiom1fr1hbagq86aabfxmbtgne996.png "/>

C. Select the system PATH environment variable, select Edit

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/88/34/wKioL1fr1jCynd_eAAAmdLG8S-4563.png "title=" Picture 6.png "alt=" Wkiol1fr1jcynd_eaaamdlg8s-4563.png "/>

D, according to the QT installation path will be C:\QT\qt-4.7.4\bin; C:\QT\qtcreator-2.4.1\bin;

The C:\QT\qtcreator-2.4.1\mingw\bin is added to the path variable. Note Use a semicolon interval between different catalogs.

E, add the variable Ld_library_path to the system variable and set its value to C:\QT\qt-4.7.4\lib; C:\QT\qtcreator-2.4.1\lib

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/88/38/wKiom1fr1mCR9NLNAAAmzMFEJbM399.png "title=" Picture 7.png "alt=" Wkiom1fr1mcr9nlnaaamzmfejbm399.png "/>

4. Compilation Tool Settings

Open QT Creator, select the Options option on the Tools menu

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/88/38/wKiom1fr1oWB197RAAC_eLe8Y88272.png "title=" Picture 8.png "alt=" Wkiom1fr1owb197raac_ele8y88272.png "/>

Select the "QT version" option in "Build and run" to add Qmake in the installation directory

at this point, Installation of the QT development environment is complete.

Second,the CentOS system QT Development environment Construction

Operating System: CentOS 6.8

QT Creator:qt-creator-linux-x86-opensource-2.4.1.bin

QT sdk:qt-everywhere-opensource-src-4.7.4.tar.gz

1. QT SDK source installation

A, decompression qt-everywhere-opensource-src-4.7.4.tar.gz source Package

TAR-ZXVF qt-everywhere-opensource-src-4.7.4.tar.gz

B, enter the extracted directory, configure the compilation environment

./configure

C, compile the source code

Make

D, installation

Make install

2. QT Creator installation

./qt-creator-linux-x86-opensource-2.4.1.bin Executing the Setup program

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/88/34/wKioL1fr1qmz3GEBAACn0Vhcsm0587.png "title=" Picture 9.png "alt=" Wkiol1fr1qmz3gebaacn0vhcsm0587.png "/>

Select the installation directory

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/88/34/wKioL1fr1sXxNozfAAA_LrTjkwc094.png "title=" Picture 10.png "alt=" Wkiol1fr1sxxnozfaaa_lrtjkwc094.png "/>

3. environment variable Settings

Open the. bashrc file in the user's home directory , and add the following code:

Export Qtdir=/usr/local/trolltech

Export path= $QTDIR/qt-4.7.4/bin: $QTDIR/qtcreator-2.4.1/bin: $PATH

Export ld_library_path= $QTDIR/qt-4.7.4/lib: $QTDIR/qtcreator-2.4.1/lib:

$LD _library_path

4. Compilation tool Settings

Open QT Creator, select the Options option on the Tools menu

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/88/38/wKiom1fr1uryEtE4AAC_eLe8Y88625.png "title=" Picture 11.png "alt=" Wkiom1fr1uryete4aac_ele8y88625.png "/>

Select the "QT version" option in "Build and run" to add Qmake in the installation directory

at this point, Installation of the QT development environment is complete.


This article from "Life is endless, struggle not only" blog, declined reprint!

Embedded Linux QT Development (ii)--QT development environment Construction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.