法,让VC自动帮你加入这个头文件的编译,在VC++的工程设置中,选择C/C++选项卡,然后选择预编译的头文件(Precompiled headers),在下面选择自动使用预补偿页眉(Automatic use of Precompiled headers),在文本框内写入stdafx.h即可。
基于54个网页-相关网页
生成的类页面让你调整你的项目文件的名字,选择基础类,增加一个缺省程序图标或选择使用预编译的头文件。
The "Generated Classes" page lets you tweak the names of your project files, choose the base class, add a default application icon or choose to use precompiled headers.
在搜索包含文件的过程中,编译器首先在每个目录中查找预编译头文件,然后再在这些目录中搜索包含文件。
As it searches for the included file, the compiler looks for a precompiled header in each directory just before it looks for the include file in that directory.
正如其名称所表示的,预编译头文件在头中止(header stop)点之前,以一种经过编译的形式包含目标代码。
As the name suggests, a precompiled header file contains object code in a compiled form that is included before the header stop point.
应用推荐