Installing QT in Raspberry Pi
This blog link: http://blog.csdn.net/jdh99, author: jdh, reprint please specify.
Environment:
Host: WIN7
Hardware: Raspberry Pi
Steps:
Reference Link: 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 would is less heavy for the Pi to download Separat Ely.
- sudo apt-get install qt4-dev-tools
Then I went for Qt Creator
- sudo apt-get install qtcreator
I also installed
- sudo apt-get install gcc
- sudo apt-get install xterm
- sudo apt-get install git-core
- sudo apt-get install subversion
This gives as a result Qt Creator 2.5 with QT 4.8.1 + bit
If the problem occurs: e:unable to locate the package Qt Creator, enter the following command to update
sudo apt-get update && sudo apt-get upgrade
If there is still a problem, try sudo apt-get install qtcreator
After success, you can run Qtcreator: You also need to add a compilation chain: Problem:no toolchain.
We can only be compile for remote embedded devices and this is not the case here, because we be on the Pi and not remotely a Ccessing 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, we is 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'll then show up as a desktop project in the Project Wizard instead of embedded.
Once configured, try running a simple program with the following results: Run successfully! However, the compilation is slow, and the formal development estimate will have to be developed on the PC before porting.
http://blog.csdn.net/jdh99/article/details/8738890
Installing QT in Raspberry Pi