1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 07:18:29 +01:00
tldr/pages/common/clang.md

16 lines
504 B
Markdown
Raw Normal View History

2015-08-04 20:18:34 +02:00
# 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:
2015-08-04 20:18:34 +02:00
`clang {{input_source.c}} -o {{output_executable}}`
- Activate output of all errors and warnings:
2015-08-04 20:18:34 +02:00
`clang {{input_source.c}} -Wall -o {{output_executable}}`
- Include libraries located at a different path than the source file:
2015-08-04 20:18:34 +02:00
`clang {{input_source.c}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`