From 3407a4ae652604bfa359a1d4161e8a456f6f43cb Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 4 Aug 2015 19:18:34 +0100 Subject: [PATCH] add clang --- pages/common/clang.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/clang.md diff --git a/pages/common/clang.md b/pages/common/clang.md new file mode 100644 index 000000000..71aba471b --- /dev/null +++ b/pages/common/clang.md @@ -0,0 +1,15 @@ +# clang + +> Compiler for C, C++, and Objective-C source files. Can be used as a drop-in replacement for GCC. + +- Compile a source code file into an executable binary + +`clang {{input_source.c}} -o {{output_executable}}` + +- Activate output of all errors and warnings + +`clang {{input_source.c}} -Wall -o {{output_executable}}` + +- Include libraries located at a different path than the source file + +`clang {{input_source.c}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`