Ubuntu12.04lts installing QT and QT Creator

Source: Internet
Author: User

On the QT website http://download.qt.io/archive/

Under the qt4.8.6:http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz

and Qt creator 2.5.2:http://download.qt.io/archive/qtcreator/2.5/qt-creator-linux-x86-opensource-2.5.2.bin

    • In the terminal, enter the following command in turn:

1 tar xzvf qt-everywhere-opensource-src-4.8. 6 . tar.gz 2 CD qt-everywhere-opensource-src-4.8. 6 3 sudo apt-get install g++4 sudo apt-get install Libx11-dev Libxext-dev libxtst-< C11>dev5 Configuring the QT Library, enter the command:./configure

After the configuration is complete, the following terminal interface is available:

Qt is now configured for building. Just run ' make '. Once Everything is built and you are must run ' make install '. Qt'll is installed into/usr/local/trolltech/qt-4.8.6to reconfigure, run ' make Confclean ' and ' Configure '.

  

    • And then enter:

Make to build the QT library and compile all the demo programs

The time here is quite long ...

    • To execute the installation command:
    1. sudo make install
    • Qt is installed by default in the/usr/local/trolltech/qt-4.8.6 directory, enter the directory, test
CD/USR/LOCAL/TROLLTECH/QT-4.8.6CD bin./qmake-v

  

If the correct version information appears, the installation is successful.

My Ubuntu installs a number of qmake, the result of the test is this.

 [Linux-devkit]:/media/tl437x/qtcreator-2.6 . 1 /bin> qmake-vqmake version  3.0  using Qt version  5.4 . 1  in /media/tl437x/ti-processor-sdk-linux-am437x-evm-01.00 . 00.03 /linux-devkit/sysroots/cortexa9t2hf-vfp-neon-linux-gnueabi/usr/lib 
[Email protected] Virtual-machine:~$ qmake-24.8. 1  in/usr/lib/i386-linux-gnu

[Email protected] Virtual-machine:/usr/local/trolltech/qt-4.8. 6/bin$./qmake-24.8. 6  in/usr/local/trolltech/qt-4.8. 6/lib

Add environment variables (need to be used in any directory to add environment variables)

You first need to set the user environment variables,

Gedit/home/your NAME/.BASHRC   

Pop up an edit window, add the following code at the end,

Export qtdir=/usr/local/trolltech/qt-4.8. 6    export PATH= $QTDIR/bin: $PATH   export MANPATH= $QTDIR/man: $MANPATH   Export Ld_ Library_path= $QTDIR/lib: $LD _library_path  

Then set the root user environment variables, set the root user's environment variables need root permission, so add sudo,

sudo gedit/etc/profile  

Add to:

Export qtdir=/usr/local/trolltech/qt-4.8. 6    export PATH= $QTDIR/bin: $PATH   export MANPATH= $QTDIR/man: $MANPATH   Export Ld_library_path

After saving the exit, and then restart the computer, in any directory of the terminal input qmake, if the correct information can appear, indicating that the environment variable configuration is successful.

Here, I did not add system variables! , which is added directly below through the Qtcreator tool option.

    • Installing Qtcreator

Installation path:/home/tl/qtcreator-2.5.2

chmod a+x qt-creator-linux-x86-opensource-2.5. 2 . bin
. /qt-creator-linux-x86-opensource-2.5. 2. bin

Open Qtcreator and add qt4.8.6, which is the version you just installed.

Run successfully, the first desktop program.

Ubuntu12.04lts installing QT and QT Creator

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.