Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set C++ standard in QtCreator with ClangCodeModel plugin?

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!

like image 614
Alex Jenter Avatar asked Oct 19 '25 01:10

Alex Jenter


1 Answers

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

like image 111
Leonardo Silvagni Avatar answered Oct 21 '25 16:10

Leonardo Silvagni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!