Build environment and cross-compilation environment

Qt version 4.8.6 opencv version 2.4.5

Host compilation environment:
Zybo is running xillylinux's xillinux version of ubuntu, reference to a Japanese tutorial installed opencv and qt. Directly using the apt-get command to install, the zybo board has installed the arm-linux-gnueabihf- compiler environment, hf is using the hardware floating point, it should be higher in efficiency, the command is as follows
Apt-get install gcc-arm-linux-gnueabihf
Apt-get install g++-arm-linux-gnueabihf

Run the following command in the xillinux terminal to install qt
Apt-get install qt4-dev-tools #development package
Apt-get install qtcreator #IDE
Apt-get install qt4-doc #document

Opencv library
Apt-get install libopencv-dev

In this way, you can directly run qtcreator to compile qt and opencv programs on the board. The specific qt method of calling opencv library is very simple.

Note: The host compiles the qt program of the desktop graphics. Generally, the cross-compiled interface on the arm board is the qws interface, and the performance of the host is definitely not as good as the performance of the pc. It takes a long time to compile a program, so it is in the pc. Set up a cross-compilation environment on the end.

PC cross compilation environment:
Since it can be compiled on zybo again, the corresponding library is available under zybo. It is very easy to think about cross-compilation environment. I want to copy the files on the board directly to the PC to see if it can be used. So I put the zybo The dynamic link files of qmake and opencv are copied to the PC side. When doing kit on qtcreator, qmake can't be parsed. . .

Still have to re-compile the qt. . . Install the arm-linux-gnueabihf- compiler on the PC side, configure in the qt source directory, this is the reference cross-compiled configuration:
./configure -embedded armv7 -xplatform qws/linux-arm-gnueabi-g++ -little-endian -opensource -host-little-endian -confirm-license -nomake demos -nomake examples -no-pch -prefix /usr/local/ Qt-arm

Very simple after the make and make install (there is no error haha ​​rp...) Note: In advance, you need to change the contents of the linux-arm-gnueabi-g++ file and then copy the opencv .so file to the same position on the arm board. In the path, the program source code compiled on the board is compiled on the pc side, (the program on the board uses opencv). The dynamic link library file of opencv can use ~, but prompts the dynamic link of gtk and gdk, etc. The file is missing, but it seems that you don't have to cross-compile opencv again. It feels so easy. For some .so files that are missing from the prompts, find the location of those files found in the board "/lib/arm-linux-gnueabihf", "/usr/lib/arm-linux-gnueabihf" path, put these two Copy the folder to the corresponding path of the PC, compile the program again, no error, copy the compiled program to the board and set the environment variable of qws to run normally.

System Integration

System Integration,Monitoring System Battery,Anti-Theft System Battery,Hybrid Power System Battery

Wolong Electric Group Zhejiang Dengta Power Source Co.,Ltd , https://www.wldtbattery.com