Update cheatsheets

This commit is contained in:
ivuorinen
2026-01-09 00:22:15 +00:00
parent 4c849cfc8a
commit ffe393201e
18 changed files with 43 additions and 40 deletions

View File

@@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git
- Compile a source file:
`cl {{path/to/source.c}}`
`cl {{path o\source.c}}`
- Compile and create an executable with a custom name:
`cl /Fe {{path/to/output_executable}} {{path/to/source.c}}`
`cl /Fe {{path o\output_executable}} {{path o\source.c}}`
- Compile a source file with optimization enabled:
`cl /O2 {{path/to/source.c}}`
`cl /O2 {{path o\source.c}}`
- Compile a source file and create a debug executable:
`cl /Zi {{path/to/source.c}}`
`cl /Zi {{path o\source.c}}`
- Compile multiple source files:
`cl {{path/to/source1.c path/to/source2.c ...}}`
`cl {{path o\source1.c path o\source2.c ...}}`
- Specify the output directory for compiled files:
`cl /Fo {{path/to/output_directory}}/ {{path/to/source.c}}`
`cl /Fo {{path o\output_directory}}/ {{path o\source.c}}`
- Compile with warnings as errors:
`cl /WX {{path/to/source.c}}`
`cl /WX {{path o\source.c}}`