Skip to content

Use BOOST_WARCHIVE_DECL for codecvt_null<wchar_t> members - #363

Merged
gennaroprota merged 1 commit into
developfrom
fix/codecvt-null-import-export-decoration
Aug 5, 2026
Merged

Use BOOST_WARCHIVE_DECL for codecvt_null<wchar_t> members#363
gennaroprota merged 1 commit into
developfrom
fix/codecvt-null-import-export-decoration

Conversation

@gennaroprota

Copy link
Copy Markdown
Collaborator

The members were declared BOOST_SYMBOL_EXPORT (always dllexport), so every consumer re-exported them even under static linking, and a DLL and EXE both using a wide archive yielded a LNK2005 error from MSVC. Use BOOST_WARCHIVE_DECL (and nothing on inline functions), instead, as the other archive classes do.

Fixes #232.

The members were declared `BOOST_SYMBOL_EXPORT` (always `dllexport`), so
every consumer re-exported them even under static linking, and a DLL and
EXE both using a wide archive yielded a LNK2005 error from MSVC. Use
`BOOST_WARCHIVE_DECL` (and nothing on inline functions), instead, as the
other archive classes do.

Fixes #232.
@gennaroprota
gennaroprota added this pull request to the merge queue Aug 5, 2026
Merged via the queue into develop with commit cf9c554 Aug 5, 2026
85 of 86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LNK2005 error of boost::archive::codecvt_null<wchar_t>

1 participant