Install Qt in Raspberry Pi

Source: Internet
Author: User

Install Qt in Raspberry Pi

 

Blog link:Http://blog.csdn.net/jdh99, Author: jdh, reprinted please note.


 

Environment:

HOST: win7

Hardware: Raspberry Pi

 

Steps:

Reference: http://qt-project.org/wiki/apt-get_Qt4_on_the_Raspberry_Pi

 

firstly I got the development tools needed by QT creator in the hope it wocould be less heavy for the PI to download separately.

    1. Sudo Apt-Get install qt4-Dev-Tools

 

Then I went for Qt creator

    1. Sudo Apt-Get install qtcreator

 

I also installed

  1. Sudo Apt-Get install gcc
  2. Sudo Apt-Get install xterm
  3. Sudo Apt-Get install git-Core
  4. Sudo Apt-Get install Subversion


This gives as a Result QT creator 2.5 with QT 4.8.1 32 bit


If the problem occurs: e: unable to locate package QT creator, enter the following command to update

Sudo apt-Get Update & sudo apt-Get upgrade


If the problem persists, trySudo Apt-Get installQtcreator

Run qtcreator:
In this case, you also need to add the compilation chain: Problem: No toolchain.

We can only compile for remote embedded devices and this is not the case here, because we are on the PI and not remotely accessing it.

I added a GCC toolchain

Options> build & run> tab tool chain> button add
choose GCC

    • Then set compiler path:/usr/bin/arm-linux-gnueabihf-gcc-4.6
    • Debugger:/usr/bin/GDB
    • Mkspec: Default

 

Qt creator seems to detect that we are going to deploy on a remote target.

to fix this:

    • go to menu help> about plugins
    • uncheck Device Support> remote Linux
    • restart QT creator
    • go to tools> options tab build & run> QT versions> Add"/usr/bin/qmake-qt4 "

 

It will then show up as a desktop project in the Project Wizard instead of embedded.

After configuration, try to run a simpleProgram, The effect is as follows:
Running successful! However, compilation is very slow. It is estimated that the official development still needs to be developed on the PC before porting.

 

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.