Opened 13 years ago

Closed 13 years ago

#3491 closed Bugs (fixed)

[serialization] Fails when static library used along with DLL

Reported by: Chard Owned by: Robert Ramey
Milestone: Boost 1.41.0 Component: serialization
Version: Boost 1.40.0 Severity: Problem
Keywords: static library dll polymorphic BOOST_DLLEXPORT Cc:

Description

If the serialization code of some polymorphic type is performed in the DLL, and there is a static library which derives from this type, the guid registration mechanism can result is duplicate guids and lead to failure.

This issue also shows how the BOOST_DLLEXPORT (stop linker dead-stripping) trick results in (MSVC) linker LNK4006 warnings for this type of set up.

The attached MSVC71 solution demonstrates the issue.

Attachments (1)

boost_serialization_lib_test.zip (9.0 KB ) - added by Chard 13 years ago.
MSVC71 project

Download all attachments as: .zip

Change History (2)

by Chard, 13 years ago

MSVC71 project

comment:1 by Robert Ramey, 13 years ago

Resolution: fixed
Status: newclosed

I've made significant changes regarding the serialization in DLLS in the next release (1.41). I built and ran your demo against this version and everything went well. So I'm thinking that this is fixed.

Robert Ramey

Note: See TracTickets for help on using tickets.