I created a new project with the platformio extension for vscode, but in the .vscode\c_cpp_properties.json file generated by platformio, i read “cppStandard”: “c++98”. In fact the error squiggles underline some errors due to c++11 specific features, but the code compiles just fine. How can i change it?
I tried setting
build_flags = -std=c++11
the code compiles just fine like it did before, but the squiggle still appear even if i restart vscode, from what i can see the file c_cpp_properties.json is regenerated at startup, still with the wrong flag
If i change the flag manually, the squiggles go away, but i lose it when vscode is restarted.
If i try setting the unflag for c++11:
build_unflags = -std=c++11
platformio compiles with the warning for c++11 features, as a proof that it’s reading that flag
warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
Did you re-initialize the project files after setting
build_flags = -std=c++11 and maybe
build_unflags = -std=c++98 (or maybe
gnu++98) by using
pio init --ide=vscode?
I did now, the result is the same. I think vscode does that by itself since the file is regenerated upon startup
Could you provide
platformio.ini? What is your dev/platform//board?
You can see the repository of the project here:
Please open PlatformIO IDE Terminal and type
pio upgrade --dev. Fixed in