Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
2.7.2
-
None
Description
Hallo everybody
I had a project perfectly compiling on Visual Studio 2019 and Qt 5.15, now I'm trying to compile it against Qt 6.2.1.
I changed the version of C++ to C+17 on the C++ language section of the VS project settings page and I also added the /Zc:__cplusplus option to the command line of the C++ project settings.
Everything works fine until the beginning of the compiling of the moc_.cpp files generatated by the moc tool. Those files (moc_.cpp) are not included in the VS project so I think they are processed by the moc tool but I got the error:
fatal error C1189: #error: "Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler." (compiling source file .\GeneratedFiles\Debug\moc_offlinetransferform.cpp)
How can I configure the moc tool to use C++17? Is there a workaround for this?
Thanks
Marco
Attachments
Issue Links
- relates to
-
QTVSADDINBUG-924 Template project Qt Quick Application using C++14 standard by default even with Qt 6
- Closed