c++编译器的工作流程

In C++
1. the preprocessor handle all preprocessing work
2. The Compiler generates the Obj File
3. The Linker generate the exe file

.cpp + compiler = obj file
.obj + linker = exe file

Compiler can only see one cpp file at a time
The linker links many obj files into 1 exe file

Translation unit = Cpp file + header file ( I am not very sure about this one, cause TU is a concept from C)

and the linkage type can be 2 kinds: internal and external, that is what I need to research about

Leave a Reply

Your email address will not be published. Required fields are marked *