Home > The Execution Monitor > Compilation
PrevNext

The Execution Monitor compilation variants and procedures

Implementation

The Execution Monitor is implemented in two modules: one header file and one source file.
Execution Monitor 在兩個模塊中實現:一個頭文件和一個源文件。

boost/test/execution_monitor.hpp

defines abstract execution monitor interfaces and implements execution exception.
定義 execution monitor 的抽像接口,實現執行異常。

libs/test/execution_monitor.hpp

provides the Execution Monitor implementation for all supported configurations, including Microsoft structured exception based, UNIX signals.
提供 Execution Monitor 實現的所有支持的配置,包含 Microsoft 結構化異常,UNIX 信號。

You may use this component in both debug and release modes, but in release mode the Execution Monitor won't catch Microsoft C runtime debug events.
你可以使用這個組件的 debug 和 release 模式,但在 release 模式下 Execution Monitor 不能捕獲 Microsoft C 運行時調試事件。

Standalone library compilation

To compile the Execution Monitor as standalone library compose it using only execution-monitor.cpp as a source file. Alternatively you can add this file directly to the list of source files for your project. Boost Test Library's components include this file as a part of their compilation procedure.
要將 Execution Monitor 編譯為獨立的庫只使用 execution-monitor.cpp 源文件。 或者你也可以將這個文件直接加入到你工程的源文件列表中。 Boost Test 庫的組件包含這個文件作為它們編譯過程的一部分。

Direct include

In some cases you may want to include the source file along with header file into your sources. But be aware that to be able to catch all kinds of standard exceptions and to implement signal handling logic this file will bring a lot of dependencies.
在某些情況下你可能需要在你的代碼中同時包含源文件和頭文件。 但要注意,想要捕獲所有標準異常並實現信號處理邏輯,這個文件會導致很多依賴。


PrevUpHomeNext