This was developed for use on Windows 10 with MinGW, but can be used on any Linux distribution.
Depenencies:
- Qt5
- OpenCV
- CMake
- GCC
- Visit the Qt download page for open source installs.
- Scroll to the bottom of the page and press the button Download the Qt Online Installer.
- The website will auto-identify the current OS and provide a download for the installer.
- Download and run the installer.
- On the
Qt Setup
page, expand the line with Qt 5.15.0 and select MinGW 8.1.0 64 bit. The only other thing to be selected on this page is Qt Creator under Tools which is not optional.
- Download pre-built OpenCV package from OpenCV-MinGW-Build and download the correct installer.
- Add
path/to/opencv/x64/mingw/bin
to the PATH
- Visit the CMake download page.
- For Windows, download the binary distribution
Windows win64-x64 Installer
. - For Linux, donwload the binary distribution
Linux x86_64
or just use the package manager like a normal person. - Run the installer.
- Visit the MinGW download page.
- Download the MinGW-W64 Online Installer and run the executable.
- On the
Settings
page, ensure Version 8.1.0, Architecture x86_64, Threads posix, Exception seh, and Build 0. - Ensure that it is installed correctly by running
gcc
and observing a fatal error.
- Install the extension CMake Tools.
- Select Debug for build variant and MinGW/GCC 8.1.0 for the active kit.
- To ensure proper syntax highlighting for Qt includes, add
path/to/Qt/%VERSION%/mingw81_64/bin/**
to theincludePath
.
https://stackoverflow.com/questions/49982419/how-to-release-a-qt-c-application-on-linux-and-windows