This problem was originally reported as #25472, but the description was deleted there, so copying it here for future reference:
In the CMake build of wxQt 3.3.0-rc1 under MSYS2 using Clang 20.1.5 and -DCMAKE_CXX_STANDARD=17 the following error occurs:
[411/848] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.obj
FAILED: libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.obj
C:\M\msys64\clang64\bin\clang++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_TESTCASE_BUILDDIR=\"C:/_/B/src/build-qt-CLANG64-shared/libs/core\" -DQT_TESTCASE_SOURCEDIR=\"C:/_/B/src/wxWidgets-3.3.0-rc1/build/cmake/lib/core\" -DQT_TESTLIB_LIB -DQT_WIDGETS_LIB -DUNICODE -DWIN32 -DWIN64 -DWINVER=0x0A00 -DWXBUILDING -DWXDLLNAME=wxqt330u_core_clang_custom -DWXMAKINGDLL_CORE -DWXUSINGDLL -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN32_WINNT=0x0A00 -D_WIN64 -D__WXQT__ -DwxUSE_BASE=0 -DwxUSE_GUI=1 -Dwxcore_EXPORTS -IC:/_/B/src/build-qt-CLANG64-shared/lib/wx/include/qt-unicode-3.3 -IC:/_/B/src/wxWidgets-3.3.0-rc1/include -isystem C:/M/msys64/clang64/include/qt6/QtCore -isystem C:/M/msys64/clang64/include/qt6 -isystem C:/M/msys64/clang64/include/qt6/QtWidgets -isystem C:/M/msys64/clang64/include/qt6/QtGui -isystem C:/M/msys64/clang64/include/qt6/QtOpenGL -isystem C:/M/msys64/clang64/include/qt6/QtOpenGLWidgets -isystem C:/M/msys64/clang64/include/qt6/QtTest -isystem C:/M/msys64/clang64/share/qt6/mkspecs/win32-clang-g++ -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1 -Wno-ignored-attributes -O3 -DNDEBUG -O2 -fomit-frame-pointer -Wall -Wundef -Wunused-parameter -Wno-ignored-attributes -Wno-ctor-dtor-privacy -Woverloaded-virtual -pthread -MD -MT libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.obj -MF libs\core\CMakeFiles\wxcore.dir\__\__\__\__\src\qt\uiaction.cpp.obj.d -o libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.obj -c C:/_/B/src/wxWidgets-3.3.0-rc1/src/qt/uiaction.cpp
C:/_/B/src/wxWidgets-3.3.0-rc1/src/qt/uiaction.cpp:180:21: error: no matching constructor for initialization of 'const QChar'
180 | const QChar qChar(key);
| ^ ~~~
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:48:31: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Key' to 'const QChar' for 1st argument
48 | class QT6_ONLY(Q_CORE_EXPORT) QChar {
| ^~~~~
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:48:31: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Key' to 'QChar' for 1st argument
48 | class QT6_ONLY(Q_CORE_EXPORT) QChar {
| ^~~~~
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:132:26: note: candidate template ignored: requirement 'disjunction<std::is_same<Qt::Key, unsigned short>, std::is_same<Qt::Key, short>, std::is_same<Qt::Key, QChar::SpecialCharacter>, std::is_same<Qt::Key, QLatin1Char>, std::conjunction<std::is_same<Qt::Key, wchar_t>, std::negation<std::integral_constant<bool, false>>>, std::is_same<Qt::Key, char16_t>>::value' was not satisfied [with Char = Key]
132 | constexpr Q_IMPLICIT QChar(const Char ch) noexcept : ucs(char16_t(ch)) {}
| ^
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:134:24: note: candidate template ignored: requirement 'disjunction<std::is_same<Qt::Key, char32_t>, std::conjunction<std::is_same<Qt::Key, wchar_t>, std::integral_constant<bool, false>>, std::is_same<Qt::Key, int>, std::is_same<Qt::Key, unsigned int>>::value' was not satisfied [with Char = Key]
134 | constexpr explicit QChar(const Char ch) noexcept
| ^
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:143:45: note: candidate template ignored: requirement 'is_same<Qt::Key, char>::value' was not satisfied [with Char = Key]
143 | QT_ASCII_CAST_WARN constexpr Q_IMPLICIT QChar(const Char ch) noexcept : ucs(uchar(ch)) {}
| ^
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:149:43: note: candidate template ignored: requirement 'is_same<Qt::Key, unsigned char>::value' was not satisfied [with Char = Key]
149 | QT_ASCII_CAST_WARN constexpr explicit QChar(const Char c) noexcept : ucs(c) { }
| ^
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:115:26: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
115 | constexpr Q_IMPLICIT QChar() noexcept : ucs(0) {}
| ^
C:/M/msys64/clang64/include/qt6/QtCore/qchar.h:119:24: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
119 | constexpr explicit QChar(uchar c, uchar r) noexcept : ucs(char16_t((r << 8) | c)) {}
| ^ ~~~~~~~~~~~~~~~~
1 error generated.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is already documented here in the Qt release notes, and IMHO adding a cast is enough to fix the error.
Since I haven't upgraded to Qt 6.9 yet, I can't test the proposed fix myself, sorry.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #25484 as completed via f3da561.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()