如何确定源文件的编译顺序? [英] How is the order of compilation of source files decided?

查看:196
本文介绍了如何确定源文件的编译顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含许多* .c文件的工作空间,我可以对其进行编译. (我可以使用任何工具链,例如MSVC6.0或gcc等)

I have a workspace containing many *.c files, which I compile. (I could use any toolchain say MSVC6.0, or gcc etc)

首先编译哪个源文件?

随后如何确定要编译的文件的顺序?

How is the order of the files to be compiled subsequently decided?

推荐答案

C标准未指定编译顺序.

The order of compilation is not specified by the C standard.

由于不需要像C ++中那样构造全局对象,因此在C中不会出现与编译顺序相关的情况.

Since there is no need for the construction of global objects like in C++, there is no situation where the order of compilation is relevant in C.

这篇关于如何确定源文件的编译顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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