编译Ubuntu-8.04时生成中间.i文件(预处理文件)

发布于 2024-09-16 13:46:18 字数 223 浏览 1 评论 0原文

我正在使用 gcc 3.4 构建 ubuntu-8.04,我需要生成 .i 文件,它们是 gcc 预处理器的输出。我尝试添加 --save-temps 标志,但这只会生成顶级目录(即源)的 .i 文件,并且似乎不会递归地传递到子目录。我还尝试了 -E 标志,它应该输出预处理文件并停止编译,但这也没有生成文件。

我特别希望为 net/core 中的源代码生成 .i 文件。

任何帮助表示赞赏。谢谢!!

I'm building ubuntu-8.04 with gcc 3.4 and I need to generate the .i files, which are the output of the gcc preprocessor. I have tried adding the --save-temps flag but this only generates the .i files for the top level directory, i.e. source, and does not seem to get passed recursively to the child directories. I also tried the -E flag, which is supposed to output preprocessed files and stop compilation, but this did not generate the files either.

I'm specifically looking to generate the .i files for the source in net/core.

Any help is appreciated. Thanks!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ヅ她的身影、若隐若现 2024-09-23 13:46:18

不支持批量预处理。

对于单个文件,请使用“make net/core/foo.i”

对于批量文件,解决方法是“make C=2 CHECK="cc -E"”。

There is no support for bulk preprocessing.

For single file use "make net/core/foo.i"

For bulk, workaround is "make C=2 CHECK="cc -E"".

红玫瑰 2024-09-23 13:46:18

我知道这是一篇旧帖子,但也许有用;对我来说这有效:
gcc -E 文件名.c -o 输出文件.i

I know that is an old post, but maybe can be useful; for me this works:
gcc -E filename.c -o outputfile.i

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文