Recent projects use embedded Linux system development. The development environment is set up in Ubuntu 12.04. This version of Lubuntu has advantages but also has many disadvantages. We do not recommend that you use a development environment for new users.
The compilation of the entire embedded Qt 4.8.4 is also relatively smooth, but there are also a number of notes to be noted, recorded, as a memorandum, also for your reference, or that sentence: "tossing and happy ".
We would like to remind you to compile the kernel and use the same cross compiler for arm-linux-gcc of qt4.8.4 to avoid unnecessary problems. 1. Install the cross-compiler arm-linux-gcc
This is not the focus of this article, but it cannot be careless. I use a friendly compiler here:
Install the software according to the development manual, but pay attention to the following points:
By default, Ubuntu 12.04 does not support root logon. It can only be operated by commands on the terminal. environment variables added under the root account cannot be used under normal accounts, however, the Qt program runs under a general account, which leads to the failure to find the compiler error when the application is designed for cross-compilation.
Link: Ubuntu 12.10 sets the root user logon Gui
Here, it is conservative to note that environment variables are added in both places:
First, add this statement in/etc/profile. Second, in the user's main directory. bashr:
Export PATH = $ PATH:/opt/FriendlyARM/toolschain/4.5.1/bin
2. Configure qt compilation options
Two methods are available for Configuration:
Change the name of the Qt 4.8.4 library to 4.7.0, and use two friendly scripts to compile the library directly. This is very convenient. You can write your own scripts, which are prone to errors and do not waste time on them, focus on applications.
It took about two hours to execute the script and finally compiled it.
Here, we have an experience to tell you that you must focus on application development. Do not waste too much energy on the tool itself. If the tool works well, it cannot reach the project results. You can borrow the tools you can borrow. This is the power of open source.
3. Set qt-creator
Choose "Tools"> "options"> "build and run" from the menu bar, which correspond to the graph in sequence.
3.1.Qt
3.2 build Kit
3.3 Compiler