zoukankan      html  css  js  c++  java
  • stdafx文件介绍

      MSDN介绍:

      These files are used to build a precompiled header file Projname.pch and a precompiled types file Stdafx.obj.

      These files are located in the Projname directory. In Solution Explorer, Stdafx.h is in the Header Files folder, and Stdafx.cpp is located in the Source Files folder.

    File name

    Description

    Stdafx.h

    An include file for standard system include files and for project-specific include files that are used frequently but are changed infrequently.

    You should not define or undefine any of the _AFX_NO_XXX macros in stdafx.h; see the Knowledge Base article "PRB: Problems Occur When Defining _AFX_NO_XXX". You can find Knowledge Base articles in the MSDN Library or at http://search.support.microsoft.com/.

    Stdafx.cpp

    Contains the preprocessor directive #include "stdafx.h" and adds include files for precompiled types. Precompiled files of any type, including header files, support faster compilation times by restricting compilation only to those files that require it. Once your project is built the first time, you will notice much faster build times on subsequent builds because of the presence of the precompiled header files.

      1:stdafx用于提高编译速度。如果不生成预编译头文件,每次编译器会编译所有cpp。然而,那些“频繁使用但改变很少的”文件不需要多次编译。为了提高编译速度,对这些文件使用预编译,编译器不需要多次重复编译。

      2:预编译生成的文件为Projname.pch和Stdafx.obj。

      3:不要使用_AFX_NO_XXX这样的宏定义。

      4:stdafx.h文件应放在cpp的第一行。在stdafx.h文件前面的所有代码将被忽略掉。(From百度百科等其他资料)

  • 相关阅读:
    android120 zhihuibeijing 开机页面
    Android View.onMeasure方法的理解
    android119 侧滑菜单
    android事件拦截处理机制详解
    Android应用在不同版本间兼容性处理
    虚拟机重置密码
    ESXi虚拟机开机进入bios的方法
    [日常工作]Win2008r2 以及更高版本的操作系统安装Oracle10.2.0.5
    Linux下安装oracle的过程
    Oracle18c Exadata 版本安装介质安装失败。
  • 原文地址:https://www.cnblogs.com/hgwang/p/5848925.html
Copyright © 2011-2022 走看看