how to solve STL1000 error
-
I don't know why this happened, previously there was a problem with CL.exe but after I restarted the qt creator CL.exe did not have an error and the project could be run but the problem is that this error appears, all cpp dah h files have the same error but the project can still be run, how can I solve it?
error: In included file: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 17.0.0 or newer.
-
I assume you are using a
clangd
which is older than17.0.0
. Qt Creator 13 https://download.qt.io/official_releases/qtcreator/13.0/ is usingclangd
from LLVM / Clang 17.0.6, which should pass the check. -
I assume you are using a
clangd
which is older than17.0.0
. Qt Creator 13 https://download.qt.io/official_releases/qtcreator/13.0/ is usingclangd
from LLVM / Clang 17.0.6, which should pass the check.@cristian-adam Do I have to update the qt creator or replace the clang manually?
-
You can do either or another. Newer Qt Creator versions come with newer ClangD version.
But in Preferences... > C++ > Clangd you can specify a path to the
clangd
executable. -
You can do either or another. Newer Qt Creator versions come with newer ClangD version.
But in Preferences... > C++ > Clangd you can specify a path to the
clangd
executable.@cristian-adam I had the same error. I downloaded the latest version of Clang, and indeed, changing the path in the clangd tab to the new path solves the problem. So, the error itself is not about the compiler, which had completely misled me, but about the clangd.exe file, which is a language server for C/C++ that provides advanced features such as code completion, code navigation, and refactoring. Thanks.