make和gcc有什么区别? [英] What is the difference between make and gcc?

查看:99
本文介绍了make和gcc有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文章中的最后一句引起了我的注意

The last sentence in the article caught my eye

[F]或C/C ++开发人员,以及 有兴趣学习的学生 C/C ++中的程序,而不是C/C ++的用户 Linux.这是因为编译 的源代码可以简化为 GNU/Linux通过使用"make" 命令.

[F]or C/C++ developers and students interested in learning to program in C/C++ rather than users of Linux. This is because the compiling of source code is made simple in GNU/Linux by the use of the 'make' command.

我一直使用gcc来编译我的C/C ++程序,而使用javac来编译我的Java程序.我只使用make通过configure/make/make install将程序安装到计算机上.

I have always used gcc to compile my C/C++ programs, whereas javac to compile my Java programs. I have only used make to install programs to my computer by configure/make/make install.

似乎您可以使用make命令来编译所有程序.

It seems that you can compile apparently all your programs with the command make.

make和gcc有什么区别?

推荐答案

嗯... gcc是编译器,make是帮助构建程序的工具.区别是巨大的.您永远不能仅使用make来构建程序.它不是编译器.它的作用是引入一个单独的规则"文件,该文件描述了如何从源代码转到完成的程序.然后,它将解释该文件,找出需要编译的内容,然后为您调用gcc.对于具有数百或数千个源代码文件的大型项目,以及跟踪诸如编译器选项,包含路径等之类的内容,这非常有用.

Well ... gcc is a compiler, make is a tool to help build programs. The difference is huge. You can never build a program purely using make; it's not a compiler. What make does it introduce a separate file of "rules", that describes how to go from source code to finished program. It then interprets this file, figures out what needs to be compiled, and calls gcc for you. This is very useful for larger projects, with hundreds or thousands of source code files, and to keep track of things like compiler options, include paths, and so on.

这篇关于make和gcc有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆