Last active
December 24, 2015 23:49
-
-
Save keikoro/6883661 to your computer and use it in GitHub Desktop.
Compile C on Mac OS X using the command line instead of e.g. Xcode. Requires GCC (GNU Compiler Collection) to be installed, which is part of Command Line Tools (which can be installed through Xcode or as separate developer package).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gcc start GNU compiler | |
# -Wall [optional] flag to show warnings (all possible warnings) | |
# $DESIREDEXECUTABLENAME [optional] name of resulting executable file; otherwise gcc auto-outputs to a.out | |
# $MYFILE.c C file that should get compiled | |
gcc -Wall $DESIREDEXECUTABLENAME $MYFILE.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment