The first time I came into contact with QT, I found that everyone had different environmental problems. I wrote down my problems and steps for reference! 1. Select the environment. QT needs to install the Xwindows operating system. At first, I started to use CentOS without a graphical interface. I found that the installation was not successful, beginner! Later, I chose Ubuntu. The reason why I chose Ubuntu was that a norm and I said that this system has a comprehensive drive, so there is no shortage of such drivers. 2. I installed Ubuntu on a virtual machine. After installation, I need to use the root user. Otherwise, many
The first time I came into contact with QT, I found that everyone had different environmental problems. I wrote down my problems and steps for reference!
1. Select the environment. QT needs to install the Xwindows operating system. At first, I started to use CentOS without a graphical interface. I found that the installation was not successful, beginner!
Later, I chose Ubuntu. The reason why I chose Ubuntu was that a norm and I said that this system has a comprehensive drive, so there is no shortage of such drivers.
2. I have installed Ubuntu on a virtual machine. After installation, I need to use the root user. Otherwise, many functions, such as ssh and nfs, will be restricted when interacting with the outside. Change User sudo passwd root.
3. Start the ssd Service. To communicate with windows, sudo apt-get install openssh-server.
4. Download the QT qt-x11-opensource-src-4.5.3.tar.gz to unzip and add settings under etc/profile
QTDIR =/usr/local/qt
PATH = $ QTDIR/bin: $ PATH
MANPATH = $ QTDIR/man: $ MANPATH
LD_LIBRARY_PATH = $ QTDIR/lib: $ LD_LIBRARY_PATH
Export qtdir path manpath LD_LIBRARY_PATH
To make the environment variables take effect, you can also directly export these variables.
5. In the compressed directory,./configure -- prefix =/usr/local/qt, The make: g ++: Command not found error occurs.
6. install g ++, first choice. Make sure you have installed the build-essential Package: sudo apt-get install build-essential (installation process, that is, install g ++ ).
Check the gcc version, ls/usr/bin/gcc *
7. Run configure under qt and find Basic XLib functionality test failed! This error
Install the sudo apt-get install libX11-dev libXext-dev libXtst-dev
8. Open the simple program Helloworld
9. qmake-project; qmake; make;./hello. Note that the environment variable 4 must be correctly configured. Otherwise, Qapplication. h cannot be found.
10. Connect to arm. Here we use a Super Terminal to connect to com. When configuring parameters, we should select none for Data Stream Control at www.linuxidc.com. If we select hardware, we cannot enter control.
11. Compile the arm file. I use the qmake provided by the Board Sub-manufacturer, that is, arm-none-linux-gnueabi-g ++ and arm-none-linux-gnueabi-gcc.
Pay attention to the configured QT environment variables.
12. Super Terminal transmission. Small files adopt zcom transmission protocol and large files adopt nfs
Use nfs, arm machine as client, Ubuntu as server, apt-get install nfs-kernel-server
Run the netstat-tl command to check whether the nfs port is enabled.
Nfs, vi/etc/exports, nfs mounting,/usr/www/src 192.168.1. * (rw, sync, no_subtree_check, no_root_squash) must be configured for Ubuntu)
Restart the service:/etc/init. d/nfs-kernel-server restart
13. On the arm terminal, mount-t nfs-o nolock 192.168.1.112:/usr/www/src/mnt
14. ls/mnt will see their Ubuntu shared directory, copy the program compiled with arm configuration, run on the Super Terminal, need to run in the background.