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)
Change History (2)
by , 13 years ago
| Attachment: | boost_serialization_lib_test.zip added |
|---|
comment:1 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
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

MSVC71 project