I want to change the standard language in c++ permanently so I no longer need to type g++ -std=c++17 <filename>
repeatedly to change the language version which was previously c++14, and that also affects vscode which I use because the compiler can't track the language rules of version c++17, it affects the editor and displays warnings and errors. I'm using Windows 10 OS, using g++ version 8.1.0, with standard language c++14, and text editor vs code
Asked
Active
Viewed 392 times
0

syafiqfadillah
- 88
- 1
- 7
-
Does this answer your question? [How to enable C++17 support in VSCode C++ Extension](https://stackoverflow.com/questions/49397233/how-to-enable-c17-support-in-vscode-c-extension) – Simon Kraemer May 06 '21 at 14:04
-
@SimonKraemer no, my problem refers to a compiler that has a default language version c++14 and I want to change it permanently to version c++17, but thanks for answering – syafiqfadillah May 06 '21 at 14:10
-
1You could add an alias to your shell if that's what you want. If you are using an IDE you should set the version in the project settings of the IDE (see my first comment). I am not aware of any possibility to change the default version in any compiler. Usually you configure such things on a project level in make, CMake, your IDE or similar. – Simon Kraemer May 06 '21 at 14:15
-
3Similar question has been answered here https://superuser.com/q/449441/376011 – Thariq Nugrohotomo May 06 '21 at 14:16
-
Does this answer your question? [Change default C++ standard in g++](https://stackoverflow.com/questions/41648978/change-default-c-standard-in-g) – May 06 '21 at 15:06