|A crash reporting system for Windows applications|
To let your Visual C++ compiler and linker know about the location of CrashRpt include and lib files, do the following.
If you use Visual Studio 2005 or 2008, open menu Tools-> Options. Then in appeared dialog, select Projects and Solutions->VC++ Directories.
If you use Visual Studio 2010 or 2012, open the Property Manager window, multi-select all projects in your solution and right click the selection. In the appeared dialog, open Configuration Properties->VC++ Directories.
Here <CRASHRPT_HOME> should be replaced with the actual path of the directory you unzipped CrashRpt distribution to.
Before you start using CrashRpt API functions in your program, do not forget to include CrashRpt.h header file in the beginning of your code:
// Include CrashRpt header #include "CrashRpt.h"
You also need to add CrashRpt LIB file to the list of input libraries for your project. In the Solution Explorer window, right-click your project and choose Properties item from the context menu. Then open Configuration Properties->Linker->Input->Additional Dependencies and then add CrashRptXXXX.lib to the list of libraries (here XXXX should be replaced with CrashRpt version number).Exception Handling and CRT Linkage section for more information.
In the Solution Explorer window, right-click your project and open project Properties. Then choose Configuration Properties->C/C++->Code Generation. In the Runtime Library field, choose Multi-threaded DLL (/MD). See the figure below for example.
This should be done for all projects in your solution to share single CRT DLL.
Multi-threaded DLL (/MD)
For example, assume you use Visual Studio 2008 and CRT 9.0 linked as DLL, but some dependent module in your application was compiled in Visual Studio 2005 and uses CRT 8.0 linked as DLL. In such situation a CRT error in the dependent module won't be intercepted by CrashRpt, because error handlers are installed for CRT 9.0 only.
To enable the generation of PDB files:
Steps 1 and 2 should be performed for all projects in your solution that support program database (EXE, DLL).
The steps 1 and 2 are presented on the figures below.
Program Database (/Zi)
Enabling Debugging Information in Linker (/DEBUG)
To disable the FPO optimization:
Disabling Frame Pointer Omission Optimzation (/Oy-)