boostorg / test

The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)
http://boost.org/libs/test
Boost Software License 1.0
183 stars 140 forks source link

xml_log_formatter missing BOOST_TEST_DECL leads to linker errors #346

Open richleigh opened 2 years ago

richleigh commented 2 years ago

Boost 1.79.0 GCC 11.2.0, -std=gnu++20 Linux 3.10 x86_64

Using a compiled shared object libboost_unit_test_framework.so and sources compiled with -DBOOST_TEST_DYN_LINK leads to undefined reference linker errors when creating/using boost::test::output::xml_log_formatter instances, that are not found when using compiler_log_formatter instances.

The culprit seems to be that the definition of class xml_log_formatter is missing the BOOST_TEST_DECL visibility macro that compiler_log_formatter has.

richleigh commented 2 years ago

Probably impacts junit_log_formatter, plain_report_formatter, and xml_report_formatter too, but haven't attempted to reproduce with those.