Minimal QT example tested on Windows WSL2 Ubuntu 20.04.
sudo apt update
sudo apt install qt5-default cmake
sudo apt install qtbase5-dev
The project provides instructions to build the GuiApp using make or cmake. All instructions assume you start at the project's root.
Cmake
mkdir build
cd build
cmake ..
make
./build/MinimalQt5App
Make
make
./build_make/MinimalQt5App
If header files are not found, you can use the following command to find the correct path:
find /usr/include/ -type f -name "*.h" -path "*/qt5/*"
- Compile QT with make file (GIST)
- https://stackoverflow.com/questions/48767576/how-to-get-my-makefile-based-c-project-to-work-with-qt-library-shortest-and-si
- https://stackoverflow.com/questions/38296756/what-is-the-idiomatic-way-in-cmake-to-add-the-fpic-compiler-option
- QT project from scratch with qmake