May 2015
Intermediate to advanced
296 pages
5h 10m
English
In this recipe, you will get to know how the Clang frontend can be used for different purposes.
You will need Clang tool.
Clang can be used as the high-level compiler driver. Let us show it using an example:
hello world C code, test.c:$ cat test.c #include<stdio.h> int main() { printf("hello world\n"); return 0; }
a.out file, which on execution gives the output as expected:$ clang test.c $ ./a.out hello world
Here the test.c file containing C code is created. Using Clang we compile it and produce an executable that on execution gives the desired result.
–E flag. In the ...Read now
Unlock full access