xml_log_formatter missing BOOST_TEST_DECL leads to linker errors

Open
#346 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
testing-qa

Research direction

Locate the declarations of xml_log_formatter and compiler_log_formatter in the Boost.Test sources and compare their visibility annotations. Verify the shared-library build and -DBOOST_TEST_DYN_LINK scenario described in the issue; done means xml_log_formatter instances link successfully without undefined references.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
213
Forks
149
Avg merge
18h 17m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/test

All issues in boostorg/test

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.