cheat/cheat/cheatsheets/gcc

22 lines
504 B
Plaintext
Raw Normal View History

# Compile a file
gcc file.c
# Compile a file with a custom output
gcc -o file file.c
# Debug symbols
gcc -g
2013-11-25 20:20:12 +01:00
# Debug with all symbols.
gcc -ggdb3
2019-02-13 14:52:33 +01:00
# Build for 64 bits
2013-11-25 20:20:12 +01:00
gcc -m64
# Include the directory {/usr/include/myPersonnal/lib/} to the list of path for #include <....>
# With this option, no warning / error will be reported for the files in {/usr/include/myPersonnal/lib/}
gcc -isystem /usr/include/myPersonnal/lib/
# Build a GUI for windows (Mingw) (Will disable the term/console)
gcc -mwindows