It has been several days since the establishment of the embedded QT development environment. It is very difficult, and sometimes it is a long process to overturn and redo it, the compilation configuration in the middle makes me feel confused, because I have just been familiar with this knowledge and even have little knowledge of UbuntuLinux, so many errors make me feel overwhelmed and analyze it, or because I don't know how to install QT. During the installation process, you can understand what the process is. I have installed QT-X11 and QTforembe
It has been several days since the establishment of the embedded QT development environment. It is very difficult, and sometimes it is a long process to overturn and redo it, the compilation configuration in the middle makes me feel confused, because I have just been familiar with this knowledge and even have little knowledge of Ubuntu Linux, so many errors make me feel overwhelmed and analyze it, or because I don't know how to install QT. During the installation process, you can understand what the process is.
I have installed QT-X11 and QT for embedded linux before, but when using QVFB, I found that QVFB was not installed. When I install the QT-X11 is downloaded directly from the NOKIA website SDK, rather than the source package SRC, And the SDK does not contain QVFB, the source package also needs to be compiled. After some hard work, I have referenced a lot of information. The following is a detailed description.
1. Install QVFB, need to know where it is, my QT-X11 is installed in/home/fengchao/qtenv/qtsdk/, and QVFB is in qtsdk/qt/tools/qvfb, it can be used only after compilation and installation. Make sure that the makefile generated by qmake is available for compilation. Then, make needs to generate the executable file qvfb for makefile, then, run cp to the home/fenchao/qtenv/x86/bin directory. (Because qvfb is used for demonstration on a computer, it is stored in the x86 environment)
Code:
$ Cd qtenv/qtsdk // environment variable setting file setenv. sh in qtsdk
$ Source setenv. sh // make the QT-X11 environment variable take effect
$ Cd qt/tools/qvfb
$ Qmake
$ Make
A typical error occurs during make: qvfb. cpp: 51: 24: error: deviceskin. h: No such file or directory.
For the reason, see:Http://www.linuxidc.com/Linux/2011-05/36012.htm
However, what it says may seem difficult for a newbie. I would like to explain it as follows:
This problem is still caused by the environment variable settings, because the QT_SOURCE_TREE settings make that deviceskin. h cannot be found during make.
Open the qvfb. pro file with QtCreator.
Row 37th # include ($ [[QT_SOURCE_TREE]/tools/shared/deviceskin. pri)
You need to set the variable QT_SOURCE_TREE.
For solutions, see:Http://www.linuxidc.com/Linux/2011-05/36013.htm
2. Step:
1) first locate the folder: qtenv/qtsdk/
$ Cd qtenv/qtsdk
2) set the directory of QT_SOURCE_TREE to our current directory. This variable qvfb. pro will be used and run the command.
$ Qmake-set QT_SOURCE_TREE $ PWD (PWD is the current directory) 3) change the variable method in qvfb. pro $ QT_SOURCE_TREE $ [QT_SOURCE_TREE] and run the following command:
$ Sed-I "s/QT_SOURCE_TREE/[QT_SOURCE_TREE]/g" tools/qvfb. pro4) execute qmake and make compilation and run the following command:
$ Cd tools/qvfb/; qmake; make5) copy to x86/bin
$ Cp qtsdk/qt/bin/qvfb x86/bin
6) test qvfb
$ Cd x86
$ Source setenv. sh
$ Cd x86/bin
$ Qvfb &
If a window appears (possibly a black screen), qvfb is successfully installed. If you want to use qvfb, run the./app-qws command, and the app is the executable file generated.
The project file app. pro is generated by qmake, run make to generate the executable file app, and then run qvfb-width 800-height 600 & finally run./app-qws to run the makefile.
If an error occurs during the make process of some files, follow the error prompt to solve the problem. Generally, the installation file is missing.