Compilation Process

C++

Compilation includes 4 steps
1. Preprocess
2. Compile
3. Assemble
4. Link

clang++ -E main.cpp>main.i
Preprocess includes codes for files, removes comments, header and expand macros.

clang++ -S main.i
Generates main.s file.

clang++ -c main.s
Generates main.o file.

clang++ main.o -o main
Generates main as executable file.

That’s it for now. See you later.

--

--

PhD Student -- Signal and Systems Engineering, Halmstad http://pk.linkedin.com/in/talhahanifbutt

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store