我们在哪里使用.i文件,以及如何生成它们? [英] Where do we use .i files and how do we generate them?

查看:254
本文介绍了我们在哪里使用.i文件,以及如何生成它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在浏览GCC手册页,发现以下行:

I was going through the GCC man page, I found the following line:

 file.i
           C source code that should not be preprocessed.

我知道运行gcc -E foo.c会在预处理后停止编译器; 但是创建.i文件的实际应用是什么.

I know that running gcc -E foo.c stops the compiler after preprocessing; but what is the real world application of creating .i files.

还可以生成除gcc foo.c -E > foo.i以外的.i文件吗?

Also is there a way of generating a .i files other than gcc foo.c -E > foo.i?

推荐答案

.i文件也称为纯C文件".处于预处理阶段

The .i files are also called as "Pure C files". In preprocessing stage

  1. 头文件将包含在内.

  1. Header files will be included.

宏将被替换.

评论已删除.

用于条件编译. 如果查看.i文件,您会看到这些内容.

Used for conditional compilation. If you look at the .i file you can see these things.

生成.i文件的命令是-

gcc -E foo.c -o foo.i

这篇关于我们在哪里使用.i文件,以及如何生成它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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