aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/cheat/gcc
blob: 6c3e2f1172210a2a458f4d9717cb802a69f79a01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Compile a file
gcc file.c

# Compile a file with a custom output
gcc -o file file.c

# Debug symbols
gcc -g

# Debug with all symbols.
gcc -ggdb3

# Build for 64 bytes
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

# Change gcc version (for exemple if not work with the last version test the old last)
# Do this before ./configure or make command
CC=gcc-6 
CXX=gcc-6