Last Updated : 21 Nov, 2021
GCC stands for GNU Compiler Collections which is used to compile mainly C and C++ language. It can also be used to compile Objective C and Objective C++. The most important option required while compiling a source code file is the name of the source program, rest every argument is optional like a warning, debugging, linking libraries, object file etc. The different options of gcc command allow the user to stop the compilation process at different stages.
Syntax:
gcc [-c|-S|-E] [-std=standard]
Example: This will compile the source.c file and give the output file as a.out file which is default name of output file given by gcc compiler, which can be executed using ./a.out
gcc source.c
Most Useful Options with Examples: Here source.c is the C program code file.
gcc source.c -o opt
gcc source.c -Werror -o opt
gcc source.c -Wall -o opt
gcc -ggdb3 source.c -Wall -o opt
gcc -Wall source.c -o opt -lm
gcc -Wall -std=c11 source.c -o opt
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4