#3368 closed Bugs (fixed)
impl/*.ipp not included
Reported by: | anonymous | Owned by: | Robert Ramey |
---|---|---|---|
Milestone: | Boost 1.40.0 | Component: | serialization |
Version: | Boost 1.38.0 | Severity: | Problem |
Keywords: | undefined reference pointer_oserializer pointer_iserializer | Cc: |
Description
when you build your own archive types, the following files have to be included manually. otherwise you get a lot of undefined references, mostly to pointer_?serializer destructors.
#include <boost/archive/impl/basic_binary_iarchive.ipp> #include <boost/archive/impl/basic_binary_oarchive.ipp> #include <boost/archive/impl/archive_pointer_oserializer.ipp> #include <boost/archive/impl/archive_pointer_iserializer.ipp>
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
if this is not needed by the default archives, there could be a header dedicated to custom-built archives. or if these headers are not implementation details (although they seem to be, because you said they won't be there in 1.40) it could just be documented that they have to be included.
I've found 2 or 3 threads in the mailing list archives with question about what causes those undefined references. (and no solution in those threads.)
follow-up: 4 comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'll just tweak the documentation
comment:4 by , 9 years ago
Replying to ramey:
I'll just tweak the documentation
... Just spent a couple of fun hours trying to figure out what was going wrong. Perhaps it is worth tweaking the documentation a bit more? Or better, have that log_archive example include the ipp files.
And for future searchers, try the above workaround if you get linker errors for newtoken and such, but know you have things linked properly for regular serialization stuff.
comment:5 by , 9 years ago
As of this moment you're more upto date on this than I am. so if you want to suggest some specific changes, I'll likely take your word that they are OK and just incorporate them.
Robert Ramey
what do you think should be changed to implement this?
The only thing that would occur to me is to have basic_binary_oarchive.ipp include archive_pointer....ipp. I'm sort of reluctant to do this as it might make things harder to follow.
note: archive_pointer_?serializer.ipp have are not used in 1.40 onward. archive_pointer_map is used instead.
Robert Ramey