Qt 6 errors on Windows
Yu Jin
yu_jin at lyx.org
Mon May 24 07:50:27 UTC 2021
Am So., 23. Mai 2021 um 09:52 Uhr schrieb Yu Jin <yu_jin at lyx.org>:
> I still can't compile with Qt 6, I just tried again with the recently
> released Qt 6.1 but I get a lot of these errors:
>
> Severity Code Description Project File Line Suppression State
> Error C2535 'QChar::QChar(ushort) noexcept': member function already
> defined or declared support (applications\LyX\support)
> C:\Qt\6.1.0\msvc2019_64\include\QtCore\qchar.h 120
>
> Severity Code Description Project File Line Suppression State
> Error C2572 'qHash': redefinition of default argument: parameter 1 support
> (applications\LyX\support)
> C:\Qt\6.1.0\msvc2019_64\include\QtCore\qhashfunctions.h 143
>
> Severity Code Description Project File Line Suppression State
> Error C3615 constexpr function 'qHash' cannot result in a constant
> expression support (applications\LyX\support)
> C:\Qt\6.1.0\msvc2019_64\include\QtCore\qhashfunctions.h 143
>
> Severity Code Description Project File Line Suppression State
> Error C2084 function 'size_t qHash(ushort,size_t) noexcept' already has a
> body support (applications\LyX\support)
> C:\Qt\6.1.0\msvc2019_64\include\QtCore\qhashfunctions.h 143
>
> It looks like these are Qt bugs, but I wanted to ask first before going to
> Qt and making bug reports... maybe I am missing something. What do you
> think?
>
I found what causes this, it is the /Zc compile option. With Qt5 it is set
to wchar_t and with Qt6 to wchar_t- in all targets, which causes troubles.
I have changed it in Visual Studio on a test basis and successfully
compiled LyX, but I guess it would need to be changed in CMake code.
Kornel, can you help me out here?
--
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210524/5ea1ba80/attachment.html>
More information about the lyx-devel
mailing list