Logo crashrpt
A crash reporting system for Windows applications

Compiling CrashRpt

By default, CrashRpt archive's bin directory contains binary files compiled in Visual Studio 2010. These files are provided for demonstration purposes only. It is strongly recommended that you compile CrashRpt yourself using your version of Visual Studio. This is needed to ensure CrashRpt uses the same version of C run-time libraries (CRT) as your application does.

Building Solution

The top-level directory of CrashRpt distribution contains solution file for Visual Studio 2010 (CrashRpt_vs2010.sln). Open this solution file to compile CrashRpt in Visual C++ 2010 or in Visual C++ Express 2010.

If you use another version (not 2010) of Visual Studio, you can generate solution/project files for your version of Visual Studio using CMake. See below for instructions.
To build the solution, choose the Release build configuration and press F7 to start building process.

When build finishes, CrashRpt executable files can be found in bin directory, and library files can be found inside of lib directory. The following files are the most important:

Above, XXXX placeholder should be the version number of CrashRpt.

Debug, Release and Release LIB Configurations

Typically, you compile CrashRpt in Release configuration. In this configuration, the build produces binary files that can be used in production environment.

The Debug configuration is used for CrashRpt debugging and should not be used for production mode. In this configuration, the build generates d-postfixed files, for example, CrashRptXXXXd.dll, CrashSenderXXXXd.exe and so on.

The Release LIB configuration is an addition to the standard Debug and Release build configurations. Typically, you should compile CrashRpt in Release configuration, but the Release LIB configuration may be useful if you use static CRT linkage.

In the Release LIB configuration, the build generates CrashSenderXXXX.exe executable file and CrashRptLIB.lib static library. In this configuration, CrashSenderXXXX.exe and CrashRptLIB.lib use static linkage to CRT.

Generating Project Files with CMake

You can generate Visual Studio project files using CMake cross-platform make system. Although CrashRpt doesn't support operating systems other than Windows and doesn't support compilers other than Visual C++, CMake is useful, because it makes it easier to maintain multiple build configurations between different versions of Visual Studio.

To generate CrashRpt solution/project files for your favorite version of Visual Studio with CMake, do the following:


cmake-gui window

CrashRpt Solution Structure

There are several projects in CrashRpt solution.


Structure of CrashRpt solution as seen in Solution Explorer window

Compilation for 64-bit (x64) Platform

CrashRpt can be compiled for both 32-bit (Win32) and 64-bit (x64) platforms. You can choose the current platform by opening menu Build->Configuration Manager... and by selecting the desired platform from the 'Active solution platform:' combo box.

If you use CMake to generate project files, select a 64-bit compiler from the drop-down list when configuring CMake.

You should have x64 compiler tools and SDK files properly installed (ensure you have checked these components during Visual C++ installation).

Notes About Compiling in Visual C++ Express

Compilation in free Visual C++ Express is a little more complicated than compilation in a commercial edition of Visual C++.

CrashRpt depends on WTL. WTL itself depends on Microsoft's library called ATL (Active Template Library). ATL library is a part of Visual Studio SDKs. An older version, ATL 3.0, is included into Microsoft Platform SDK for Windows Server 2003. Since then, Platform SDK was renamed into Windows SDK. However, Microsoft doesn't include ATL into Windows SDK to encourage using of commercial Visual Studio having ATL.

So, there are two ways to compile CrashRpt in Visual C++ Express:

Recommended way. Install Windows Driver Kit, version 7.0 or later, because it contains ATL 7.1 source code. When WinDDK is installed, in VC++ Express window, open Tools->Options...->Projects and Solutions-> VC++ Directories. In the 'Show directories for' combo, select 'Include files' and then add C:\WinDDK\6001.18002\inc\crt\atl71 path to the list of include directories.

Alternative way. You need to have Platform SDK for Windows Server 2003, because this Platform SDK contains ATL 3.0 source code. Download and install Microsoft Platform SDK for Windows Server 2003, for example from here.

In VC++ Express window, open Tools->Options...->Projects and Solutions-> VC++ Directories. In the 'Show directories for' combo, select 'Include files' and then add <Platform_SDK_Folder>\Include\atl path to the list of include directories (replace the <Platform_SDK_Folder> with the actual directory name).

Generating Project Documentation

By default, project documentation is already generated and included into the CrashRpt distribution. To open the documentation, click index.html file in the top-level directory of CrashRpt distribution.

You can also build documentation yourself. CrashRpt documentation can be generated using the Doxygen tool. You can download the tool from here.

To build the documentation, go to the docs folder and type in the command line:

doxygen Doxyfile

When doxygen finishes, go to the top level directory and open index.html.

Further reading: Configuring Your Project's Build Settings.

Generated on Wed Apr 29 10:17:31 2015 for CrashRpt by doxygen 1.5.9