2.2. Compiling a source file
You can compile source files and assembly language files with clang command to produce an executable binary. Add the -g flag to your clang command to include debug information.
注記
To compile a C++ program, use clang++ instead of clang.
Procedure
Compile your program:
$ clang -g -o <binary_file> <source_file>Replace
<binary_file>with the name of your output file and<source_file>with the name of your source file.