Confused about Linker in C ++

I am new to C ++ and trying to understand everything. I know that Linker associates an object file with any external files. Right? Does the linker bind preprocessors? or just additional files?

For example, in a simple Hello World program. Will the linker contact my Hello World program?

+3
source share
3 answers

This is a good explanation.

Wikipedia in linkers

+3
source

, , Hello World , , prinf, , . . , "" , , . , , . , , .

+1

Linker .o. .o. .

1: : g++ -c relatedFile.cpp

Step 2: Link: g ++ -o proName relatObjFile.o (external library)

0
source

Source: https://habr.com/ru/post/1788629/


All Articles