programming:visual_studio:configure_visual_studio
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
programming:visual_studio:configure_visual_studio [2023/06/25 17:38] – created peter | programming:visual_studio:configure_visual_studio [2023/06/25 17:47] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Programming - Visual Studio - Configure Visual Studio ====== | ====== Programming - Visual Studio - Configure Visual Studio ====== | ||
+ | |||
+ | Within .vscode, | ||
+ | |||
+ | Add some more compiler arguments (also called flags) to tasks.json. | ||
+ | |||
+ | <code json tasks.json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | //" | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** | ||
+ | |||
+ | * The arguments **-Wall**, **-Wextra**, | ||
+ | * VS Code will then display these warnings right in the editor. | ||
+ | * This is an incredibly useful feature, which will automatically detect and help prevent potential bugs in our code. | ||
+ | * Never develop any C or C++ program without turning on all of these warning flags! | ||
+ | |||
+ | * In addition, **-Wpedantic** and **-std=c23** will instruct GCC to comply with the ISO C23 standard, the most recent standard, which will ensure that our program is maximally portable and can be compiled on other standards-complying compilers without too much hassle. | ||
+ | |||
+ | * On Windows only, we should add the flag **-D__USE_MINGW_ANSI_STDIO=1**, | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | <code json launch.json> | ||
+ | { | ||
+ | // Use IntelliSense to learn about possible attributes. | ||
+ | // Hover to view descriptions of existing attributes. | ||
+ | // For more information, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
programming/visual_studio/configure_visual_studio.1687714696.txt.gz · Last modified: 2023/06/25 17:38 by peter