Error : STL1000: Unexpected compiler version, expected Clang 7 or newer

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\yvals_core.h(294,5): error : STL1000: Unexpected compiler version, expected Clang 7 or newer.

I’m not sure why on some machines this error occurs, and on others it does not.
however, defining _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH

in here:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\ComputeCpp.props
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\ComputeCpp.props

or adding

main.cpp ->Properties->Configuration Properties -> ComputeCpp SYCL Cpp->Device->Additional Options

-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH

works around this.

1 Like

This issue is unfortunately out of our control as it’s a check that is done by Visual Studio. Thanks for providing your workaround.
There are some other alternatives:

An alternative is to use the VS2015 toolset by switching to this in “Configuration Properties->General->Platform Toolset”

Another alternative if you are using CMake is to use the ComputeCppCompilerChecks.cmake file to deal with the versioning issue by adding this to the FindComputeCpp.cmake file:
include(ComputeCppCompilerChecks)

I think you are saying I should use the v140 (2015) toolset, but as I understand it, it is binary compatible with the v141 (and v142 for that matter) toolset, so it shouldn’t matter, really? That being said I can see its the microsoft header doing the sanity check, so I see what you mean. My problem is solved for now by switching toolsets (to v140), I’ll look into it in more detail later, thanks for the quick response!

We’ve made some updates to support the latest toolset so this issue should now be resolved.