/ show在g ++中包含等价选项 [英] /show include equivalent option in g++

查看:145
本文介绍了/ show在g ++中包含等价选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我看到VC ++包含一个名为/ show include的选项来列出每个翻译单元中包含文件的层次结构。这似乎是一个非常有用的选择 - 在大型项目中优化/改进编译时间。



问题

在GNU g ++编译器中是否有相同的选项来获得这些(相似的输出)?

解决方案

控制这个。



-MD将列出文件,-MMD将列出非系统文件作为编译的副作用



< -M,-MM将生成列表而不是编译。



-MQ,-MG,-MP和-MT生成makefile目标片段。 -MF允许你指定一个输出文件名。



I see that VC++ includes an option called /show include to list you the hierarchy of include files in each translation unit. This seems to be a very helpful option - to optimise/improve the compilation time in a large scale project.

Question
Is there any equivalent option in GNU g++ compiler to get these (similar output)?

解决方案

There's a variety of options for controlling this.

-MD will list files, -MMD will list non-system files as side effects of compilation

-M, -MM will generate lists instead of compiling.

-MQ, -MG, -MP and -MT generate makefile target fragments. -MF allows you to specify an output filename.

这篇关于/ show在g ++中包含等价选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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