programming:visual_studio:configure_visual_studio
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
programming:visual_studio:configure_visual_studio [2023/06/25 17:42] – peter | programming:visual_studio:configure_visual_studio [2023/06/25 17:47] (current) – peter | ||
---|---|---|---|
Line 2: | Line 2: | ||
Within .vscode, | Within .vscode, | ||
+ | |||
+ | Add some more compiler arguments (also called flags) to tasks.json. | ||
<code json tasks.json> | <code json tasks.json> | ||
Line 40: | Line 42: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | <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**, | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
---- | ---- | ||
Line 74: | Line 93: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
programming/visual_studio/configure_visual_studio.1687714947.txt.gz · Last modified: 2023/06/25 17:42 by peter