Ubuntu 14.04 LTS installs Qt 5.3.2

Source: Internet
Author: User

First, the Environment configuration

Dependent software:

Please read the Readme file in detail and install the dependent package

Qt-everywhere-opensource-src-5.3.2/readme

Qtbase/src/plugins/platforms/xcb/readme

QT Version: qt-everywhere-opensource-src-5.3.2

Configuration files, ~/.BASHRC and ~/.profile

Path configuration: #这个是我安装并配置Qt之后的完整的配置路径

Export path=/usr/local/qt-5.3. 2/qtbase/bin: $PATHexportmake =/usr/bin/makeexport Ld_library_path=/usr/local /qt-5.3. 2/qtbase/lib

Second, the installation process

1, first install the Gcc,make,tar, tools, and then install the corresponding dependent packages.

2, by installing QT before you need to configure the path as follows:

Export path=/usr/local/qt-5.3. 2/qtbase/bin: $PATH  #源码qt中qmake位置exportmake =/usr/bin/make  #当不能识别make时, Specify the path

3, installation process:

CD <path>/qt-everywhere-opensource-src-<version>. /configure-prefix $PWD/qtbase-opensource-nomake testsmake4

4. Configure the path after QT installation

Export path=/usr/local/qt-5.3. 2/qtbase/bin: $PATHexportmake =/usr/bin/makeexport Ld_library_path=/usr/local /qt-5.3. 2/qtbase/lib
Third, the use of instructions

1. Use the command in the current source file directory (Test.cpp) to generate a platform-independent project file Test.pro

Qmake–project

2. Generate a platform-related makefile file from the project file

Qmake Test.pro

3. Build the program

Make

Note: The resulting pro file needs to be added with the appropriate components

Test.cpp Source

#include <QApplication><QLabel>int main (intChar* argv[]) {         qapplication app (argc, argv);          New Qlabel ("hello Qt");         Label, Show ();          return app.exec ();}

Corresponds to the generated Hello.pro

####################################################################### automatically generated by Qmake ( 3.0  + at:= == =++ + test.cpp

Where you need to add components

QT       +=4): qt + = Widgets

Otherwise the error

Reference:

Adding components

Http://bbs.csdn.net/topics/390658864?page=1

Ubuntu 14.04 LTS installs Qt 5.3.2

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.