Is it possible to build QT 6 with MSVC2017
-
Hi,
I am currently migrating our code from QT5.15 to QT 6. And I am having a lot of errors in qnamespace.h after upgrading to QT 6.0. Some of the errors are like :
ShiftModifier is not a member of QT
ControlModifier is not a member of QT
AltModifier is not a member of QT
staticMetaObject: undeclared identifier
qt_getEnumMetaObject: redefinition; previous definition was function
sytnax errors, etc -
Hi,
I am currently migrating our code from QT5.15 to QT 6. And I am having a lot of errors in qnamespace.h after upgrading to QT 6.0. Some of the errors are like :
ShiftModifier is not a member of QT
ControlModifier is not a member of QT
AltModifier is not a member of QT
staticMetaObject: undeclared identifier
qt_getEnumMetaObject: redefinition; previous definition was function
sytnax errors, etc@Rajnish said in Is it possible to build QT 6 with MSVC2017:
I am currently migrating our code from QT5.15 to QT 6. And I am having a lot of errors in qnamespace.h after upgrading to QT 6.0.
First, eliminate all deprecation warnings in Qt 5.15 before trying to port to Qt 6.
See https://doc.qt.io/qt-6/portingguide.html
ShiftModifier is not a member of QT
ShiftModifier is not a menber of
QT
, but it is definitely a member ofQt
: https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum -
Hi JKSH,
Can you please suggest me how to deprecate these warnings you are suggesting.
Thanks@Rajnish said in Is it possible to build QT 6 with MSVC2017:
Can you please suggest me how to deprecate these warnings you are suggesting.
See the link I gave you
-
Also I had the same error as mentioned in QTBUG-88556. But unable to find any resolution use it
@Rajnish said in Is it possible to build QT 6 with MSVC2017:
I have used the macro "QT_DISABLE_DEPRECATED_BEFORE" but errors are still persistent. Even set it to "=0x000000" in the cmake file.
You are supposed to build in Qt 5.15 (not Qt 6). If you see any deprecation warnings, fix them.
You must make sure that your project builds OK in Qt 5.15 even when you have set
QT_DISABLE_DEPRECATED_BEFORE=0x050F00
. After you achieve this, then you are ready to port to Qt 6.Also I had the same error as mentioned in QTBUG-88556. But unable to find any resolution use it
Actually, QTBUG-88556 does have a resolution: Switch from the MSVC 2017 compiler to the MSVC 2019 compiler. Does this answer your original question?
-
The supported platforms page clearly states that you need MSVC2019.