]> Pileus Git - ~andy/sfvlug/blobdiff - c/src/cc.sh
Add C notes.
[~andy/sfvlug] / c / src / cc.sh
diff --git a/c/src/cc.sh b/c/src/cc.sh
new file mode 100755 (executable)
index 0000000..eaf9a05
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Simplest complie 
+cc hello.c
+./a.out
+
+# Standard CC compile
+gcc --std=c99 -Wall -o hello hello.c
+./hello
+
+# Bulding object files
+gcc -c -o hello.o hello.c
+gcc -o hello hello.o -lm
+./hello
+
+# Building with make
+make hello
+./hello