问题
Sorry if this is a dumb question, but I have already tried almost everything and am banging my head against a wall right now..
The problem is, QtCreator 4.8.0-beta for Windows with Clang Code Model plugin parses my project as C++98 whereas in fact it is C++17. However specifying the standard version explicitly in the settings dialog is not allowed ("Option "-std=c++17" is invalid").
So, how do I tell ClangCodeModel that it should parse code as C++17?
I use CMake for building the project and have set (CMAKE_CXX_STANDARD 17)
in the top-level CMakeLists.txt file.
Thanks!
回答1:
I think your question is similar to This one, According to the link, dated October 2018, it is an issue of QtCreator and does not seem to have been solved. However I would suggest you to test yourself the solution proposed in the link, infact it may work on your pc. If you are still stuck into this problem, try to install the latest version of Qt 5
来源:https://stackoverflow.com/questions/53481748/how-to-set-c-standard-in-qtcreator-with-clangcodemodel-plugin