Problem with new Visual Studio update 2017 Version 15.9.4 and Qt 5.9.3
-
I have read the fix suggested in this forum titled: [https://forum.qt.io/topic/93711/problem-with-new-visual-studio-update-2017-version-15-8-0-and-qt-5-9-5](link url)
It involved using a patched version of "qalgorithms.h", however that does not work for me.
I am still getting the error:
Error (active) E2512 the argument to a feature-test macro must be a simple identifier in qcompilerdetection.h
with Qt version Qt 5.9.3 (I cannot change the QT version, I am creating a DLL plugin for an very large program from a 3rd party).
and VS Studio 15.9.4 (notice the higher version of VS2017).
BTW, the solution was created by cmake and it says the C++ compiler is:
MSVC 19.16.27025.1 -
I replace the qalgorithms.h cleaned the cmake cache, did a full rebuild. And now it is working for me also.
I am using VS2017 15.9.4 and doing a x64 build with release symbols.
The only odd thing I see, is that if there are any compile errors (other than these, then the E2512 error returns also. But that sort of behavior I see a lot with microsoft VC++ compiler, so don't sweat it.
-
@Doctor-G According to https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B both versions you posted mean VS2017
-
@Doctor-G said in Problem with new Visual Studio update 2017 Version 15.9.4 and Qt 5.9.3:
Error (active) E2512 the argument to a feature-test macro must be a simple identifier
in qcompilerdetection.hOn which line exactly?
-
I am having this same problem. For me it is occurring on lines 1349 and 1351:
#if QT_HAS_CPP_ATTRIBUTE(clang::fallthrough) //1349 # define Q_FALLTHROUGH() [[clang::fallthrough]] #elif QT_HAS_CPP_ATTRIBUTE(gnu::fallthrough) //1351 # define Q_FALLTHROUGH() [[gnu::fallthrough]] #elif QT_HAS_CPP_ATTRIBUTE(fallthrough) # define Q_FALLTHROUGH() [[fallthrough]] #endif
-
I replace the qalgorithms.h cleaned the cmake cache, did a full rebuild. And now it is working for me also.
I am using VS2017 15.9.4 and doing a x64 build with release symbols.
The only odd thing I see, is that if there are any compile errors (other than these, then the E2512 error returns also. But that sort of behavior I see a lot with microsoft VC++ compiler, so don't sweat it.
-
@primem0ver I was getting the errors on these same lines.