Difference between revisions of "Compile QT in an ARM device"

From wiki.ferrari.mo.it
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
  qmake
 
  qmake
 
  make
 
  make
 
5. Compiler setup
 
 
Download and install CMake from cmake.org. During installation, select the option 'Add CMake to the PATH for all users'.
 
 
Go to Control Panel - System, and then to 'Advanced System Setting'. Go to the 'Advanced' tab and click on 'Environment Variables'.
 
Add the MinGW path to the Path variable (in this case, it is C:\Qt\Tools\mingw730_64\bin).
 
 
6. Install OpenCV and compile its libraries
 
 
Download OpenCV from Sourceforge, then install it (file opencv-4.1.1-vc14_vc15.exe) into the C:\OpenCV\ directory.
 
 
Then, go to the CMake directory (C:\Program Files\CMake\bin) and execute cmake-gui.exe.
 
 
* Where is the source code: C:/OpenCV/sources
 
* Where to build the binaries: C:/OpenCV/opencv-build
 
 
Click next.
 
 
* Specify the generator for this project: MinGW Makefiles
 
* Specify native compilers
 
* Compilers C: C:\Qt\Tools\mingw730_64\bin\gcc.exe
 
* Compilers C++: C:\Qt\Tools\mingw730_64\bin\g++.exe
 
 
Click configure for the first time.
 

Latest revision as of 16:22, 18 August 2019

Compile QT application in an ARM device[edit]

1. Install compiler

apt-get install g++

2. Install required packages

apt-get install qttools5-dev
apt-get install qt5-default

3. Install required modules. Examples:

apt-get install libqt5sql5
apt-get install libqt5serialport5-dev
apt-get install libqt5websockets5-dev

4. Compile

cd my_dir
qmake
make