stdafx.h的用途 [英] Purpose of stdafx.h

查看:123
本文介绍了stdafx.h的用途的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文件 stdafx.h 的用途是什么?预编译头 p>

What is the purpose of the file stdafx.h and what is meant by precompiled headers?

推荐答案


stdafx.h / strong>是一个由
生成的文件。Microsoft Visual Studio IDE向导
描述标准系统
和项目特定包含文件

ever change

兼容的编译器(例如,
Visual C ++ 6.0及更高版本)将
预编译此文件以减少
整个编译时间

stdafx.h is a file, generated by Microsoft Visual Studio IDE wizards, that describes both standard system and project specific include files that are used frequently but hardly ever change. Compatible compilers (for example, Visual C++ 6.0 and newer) will pre-compile this file to reduce overall compile times.

Visual C ++将

之前不编译任何内容 #includestdafx.h在源文件
中,除非编译选项
/Yu'stdafx.h'未选中(通过
默认);它假设
源中的所有代码都已经编译过,包括那行
已经被编译。

Visual C++ will not compile anything before the #include "stdafx.h" in the source file, unless the compile option /Yu'stdafx.h' is unchecked (by default); it assumes all code in the source up to and including that line is already compiled.

http://en.wikipedia.org/wiki/Precompiled_header

这篇关于stdafx.h的用途的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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