Working with precompiled header files (C code)
A precompiled header file can greatly reduce the time taken to perform a repeated reverse engineering operation, or to reverse engineer parts of the same project that share the same header files.
A precompiled header file saves time because it results in the Reverser having to parse library files that are included in all code files only once, rather than parsing those library files each time the Reverser is used with those code files.
To make use of a precompiled header file, you must do the following:
Create a header file that includes the library files that are common to each code file. A library header file should not include files that are modified regularly.
Make each code file include the header file you created, rather than including the individual library files. The #include for the header file you created must be at the top of the code file.
Through the Reverser user interface, you can specify that you want to use a precompiled header file and specify the file from which you want it built. The Reverser then parses the files and builds the precompiled header file. If you use the Reverser to parse those code files again, the Reverser saves time by using the precompiled header file in preference to parsing the associated library files.
If you are using the Microsoft Visual Studio 6.0compiler and your project is set up to use a precompiled header (usually called Stdafx.cpp), you can select the Visual Studio project file from the Select Model page of the Reverser and the Reverser options will be set up to generate a precompiled header file.
If you cannot load a Visual Studio project file, you must set up the Reverser options to generate the precompiled header file from the correct header file; from the Reverse Engineering Options 1 page of the Reverser, ensure that the code file from which you want to build the precompiled header file is first in the list, and then select the Use PCH File check box.
* 
Before using a precompiled header file, the Reverser checks that included library files have not been updated. If any library files have changed, the Reverser rebuilds the precompiled header file. The Reverser uses a precompiled header file when it has to parse the code file from which the precompiled header file was built.
The Reverser builds the precompiled header file in the context of the #defines that are set up on the Reverse Engineering Options 2 page of the Reverser. If the #defines in a code file invalidate the precompiled header file, the Reverser parses the associated library files in the context of the #defines and #include search paths set up in that code file.
The precompiled header files are built in the Windows temporary directory. The Reverser typically creates two PCH files for each project.
If your project is not set up to use a precompiled header file, ensure that the Use PCH File check box on the Reverse Engineering Options 1 page is cleared.
Was this helpful?