diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-04 16:20:02 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-04 16:20:02 +0200 |
| commit | d19f0b7aab67306c158c4cee3175d72242296489 (patch) | |
| tree | e150c0a830bafe71bf99d16e1183d66b25f3ef95 /README.md | |
| parent | 3dc1d598a056efc25b168e30c6692f76989f7f30 (diff) | |
| download | minimal-qt-d19f0b7aab67306c158c4cee3175d72242296489.tar.gz minimal-qt-d19f0b7aab67306c158c4cee3175d72242296489.zip | |
Diffstat (limited to '')
| -rw-r--r-- | README.md | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -9,8 +9,8 @@ without using CMake or QT Creator. | |||
| 9 | * QT libraries and headers | 9 | * QT libraries and headers |
| 10 | * The QT development tools `moc` and `uic` | 10 | * The QT development tools `moc` and `uic` |
| 11 | 11 | ||
| 12 | On Fedora Linux they are contained in the `qt6-qtbase-devel`. I have | 12 | On Fedora Linux they are contained in the `qt6-qtbase-devel` package. |
| 13 | not tested this on other operating systems. | 13 | I have not tested this on other operating systems. |
| 14 | 14 | ||
| 15 | ## tl;dr | 15 | ## tl;dr |
| 16 | 16 | ||
| @@ -38,8 +38,8 @@ The compilation is done in 3 steps: | |||
| 38 | The `Makefile` implements these three steps. | 38 | The `Makefile` implements these three steps. |
| 39 | 39 | ||
| 40 | The first two steps are straightforward: first you need to locate the | 40 | The first two steps are straightforward: first you need to locate the |
| 41 | `moc` and `uic` command - they are usually in the QT installation | 41 | `moc` and `uic` commands. They are usually in the QT installation |
| 42 | folder. For example I have them in `/usr/lib64/qt/libexec`. Then run: | 42 | folder - for example I have them in `/usr/lib64/qt/libexec`. Then run: |
| 43 | 43 | ||
| 44 | ``` | 44 | ``` |
| 45 | /usr/lib64/qt/libexec/moc mainwindow.h > moc_mainwindow.cpp | 45 | /usr/lib64/qt/libexec/moc mainwindow.h > moc_mainwindow.cpp |
| @@ -53,11 +53,11 @@ For the last step, one needs to include the header files and link with | |||
| 53 | the QT libraries. | 53 | the QT libraries. |
| 54 | 54 | ||
| 55 | On my system the header files are in `/usr/include/qt6`. This means I | 55 | On my system the header files are in `/usr/include/qt6`. This means I |
| 56 | need to add the option `-I /usr/include/qt6` to my `gcc` command. This | 56 | need to add the option `-I /usr/include/qt6` to my `g++` command. This |
| 57 | simple project also requires headers contained in a subfolder of this, | 57 | project also requires headers contained in a subfolder of this, |
| 58 | so I will add a second `-I` option (see the full command below). | 58 | so I will add a second `-I` option (see the full command below). |
| 59 | 59 | ||
| 60 | As for the system libraries, in my case they are installed in a system | 60 | As for the shared libraries, in my case they are installed in a system |
| 61 | folder that is scanned by default by the linker, so I don't have to | 61 | folder that is scanned by default by the linker, so I don't have to |
| 62 | specify the path. We need the files `libQt6Widgets.so`, `libQt6Core.so` | 62 | specify the path. We need the files `libQt6Widgets.so`, `libQt6Core.so` |
| 63 | and `libQt6Gui.so`, which we can include with | 63 | and `libQt6Gui.so`, which we can include with |
