Skip to content

[fix] Daggy and DaggyCore always require Qt6 Network#103

Merged
synacker merged 5 commits intosynacker:masterfrom
uilianries:fix/qt-cmake
Oct 16, 2025
Merged

[fix] Daggy and DaggyCore always require Qt6 Network#103
synacker merged 5 commits intosynacker:masterfrom
uilianries:fix/qt-cmake

Conversation

@uilianries
Copy link
Contributor

Hello!

When building the project with the CMake option CONSOLE=ON, it fails to build due the following error:

[2/24] /usr/bin/c++ -DCONAN_BUILD -DDaggyCore_EXPORTS -DQT_CORE_LIB -DQT_NO_DEBUG -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/DaggyCore_autogen/include -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/exports -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/src/src -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/src/src/DaggyCore/.. -isystem /home/uilian/.conan2/p/b/qtf9d9cecdf8905/p/include -isystem /home/uilian/.conan2/p/b/qtf9d9cecdf8905/p/include/QtCore -isystem /home/uilian/.conan2/p/b/qtf9d9cecdf8905/p/mkspecs/linux-g++ -m64 -O3 -DNDEBUG -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -Winvalid-pch -x c++-header -include /home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx -MD -MT DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch -MF DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch.d -o DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch -c /home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.cxx
FAILED: [code=1] DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch 
/usr/bin/c++ -DCONAN_BUILD -DDaggyCore_EXPORTS -DQT_CORE_LIB -DQT_NO_DEBUG -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/DaggyCore_autogen/include -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/exports -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/src/src -I/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/src/src/DaggyCore/.. -isystem /home/uilian/.conan2/p/b/qtf9d9cecdf8905/p/include -isystem /home/uilian/.conan2/p/b/qtf9d9cecdf8905/p/include/QtCore -isystem /home/uilian/.conan2/p/b/qtf9d9cecdf8905/p/mkspecs/linux-g++ -m64 -O3 -DNDEBUG -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -Winvalid-pch -x c++-header -include /home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx -MD -MT DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch -MF DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch.d -o DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.gch -c /home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx.cxx
In file included from /home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/build/Release/DaggyCore/CMakeFiles/DaggyCore.dir/cmake_pch.hxx:5,
                 from <command-line>:
/home/uilian/.conan2/p/b/daggy1d7b04eeacd13/b/src/src/DaggyCore/Precompiled.hpp:30:10: fatal error: QHostAddress: No such file or directory
   30 | #include <QHostAddress>
      |          ^~~~~~~~~~~~~~

You can see the full build log: daggy-2.2.3-linux-gcc11-shared.log

It occurs because both DaggyCore and Daggy (console app) include the header file Precompiled.hpp, which needs QHostAddress. As the QHostAddress is part of the Qt Network module and both Daggy projects always use Precompiled.hpp, the Qt6::Network CMake target should always be listed as required.

This PR adds Qt6 Network as a required module, and lists its CMake target to be used by both Daggy (console app) and DaggyCode (library).

Regards.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@uilianries
Copy link
Contributor Author

The CI failed due to a configuration error, nothing related to this PR changes.

@synacker synacker merged commit 7dd0ffd into synacker:master Oct 16, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants