C ++编译和链接

问题描述:

我发现了一个有关在C ++中进行编译和链接的问题,但我不知道哪个答案是正确的.与我的朋友们讨论过,意见分歧.这是一个问题:

I found one question about compiling and linking in C++ and I don't know which answer is correct. It was discussed with my friends and opinions are divided. Here is a question:

为了运行以C ++语言编写的程序,其源代码为:

(一)编译成机器码,
(二)编译并链接到机器代码

我认为正确的答案是A,但我没有任何来源可以证明这一点.

In order to run program written in C++ language its source code is:

(A) compiled to machine code,
(B) compiled and linked to machine code

In my opinion the correct answer is A but I don't have any source to prove it.

Google,第一击.

还需要链接来创建独立的可执行文件.

Linkage is needed as well to create a standalone executable.