When we compile a source code that contains a 'main' without linking, why can't we run it?

前端 未结 3 1701
天涯浪人
天涯浪人 2021-01-07 07:39

I am learning about compiling process and I know that linking is mainly used to link a binary file which contains a \'main\' function with other binary files that contain ot

3条回答
  •  执念已碎
    2021-01-07 07:50

    Even the most basic commands like exit aren't directly in the language and need to be linked.

    http://en.cppreference.com/w/c/program/exit

提交回复
热议问题