|> The Unit Test Framework > User's guide > Usage variants > Static library|
The UTF can be built into a static library. If you opt to link a test module with the standalone static library, this usage is called the static library variant of the UTF.
The test runner supplied with this variant requires you to implement the test module initialization function that matches one of the two specifications depending on the compilation flag BOOST_TEST_ALTERNATIVE_INIT_API. If flag isn't defined you are required to match the original specification. If you define the flag BOOST_TEST_ALTERNATIVE_INIT_API during a test module compilation you are required to use the alternative initialization function specification. The UTF provides an ability to automatically generate an empty test module initialization function with correct specification if no custom initialization is required by a test module.
If you opted to use an alternative initialization API, for a test module to be able to link with prebuilt library, the flag BOOST_TEST_ALTERNATIVE_INIT_API has to be defined both during library and a test module compilation.