[Serialization] Linker errors issue with using binary_wiarchive.hpp and binary_woarchive.hpp

Hello there, I've never used one of these Mailing List conversations before so I apologise for any mistakes. To the point: I'm having issues trying to get the wide character version of Boost's serialization libaries working. When I attempt to compile the result is a multitude of Linker errors. After Googling failed to turn up anything I posted the question on Stack Overflow, where a reply suggested there may be 'a bug in Boost.Serialization'. Stack Overflow features nice syntax highlighting so it is easy to see the code, I pieced it together from other normal character examples: http://stackoverflow.com/questions/10439984/serialization-example-of-boost-a... If there is a rule against posting external links, I apologise. Or if people want me to paste the code directly in to an email for this mailing list I will do so. The Stack Overflow question was originally based on my thought that I had made a mistake in my code. If this IS the case then I do apologise, and I would appreciate knowing just where I've gone wrong. Regards.

From: http://www.boost.org/doc/libs/
It looks like the serialization library requires you to build boost (it is
not header only)
Instructions can be found here:
http://www.boost.org/doc/libs/1_49_0/more/getting_started/windows.html
http://www.boost.org/doc/libs/1_49_0/more/getting_started/unix-variants.html
If you have built boost already, make sure to include the boost libs in your
linker path.
Regards
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Lord Metritutus
Merkwurdichliebe
Sent: Thursday, May 03, 2012 5:09 PM
To: boost-users@lists.boost.org
Subject: [Boost-users] [Serialization] Linker errors issue with using
binary_wiarchive.hpp and binary_woarchive.hpp
Hello there, I've never used one of these Mailing List conversations before
so I apologise for any mistakes.
To the point: I'm having issues trying to get the wide character version of
Boost's serialization libaries working. When I attempt to compile the
result is a multitude of Linker errors. After Googling failed to turn up
anything I posted the question on Stack Overflow, where a reply suggested
there may be 'a bug in Boost.Serialization'. Stack Overflow features nice
syntax highlighting so it is easy to see the code, I pieced it together from
other normal character examples:
http://stackoverflow.com/questions/10439984/serialization-example-of-boost-a
rchive-binary-woarchive-hpp-and-or-boost-archive

Lord Metritutus Merkwurdichliebe wrote:
Hello there, I've never used one of these Mailing List conversations before so I apologise for any mistakes.
To the point: I'm having issues trying to get the wide character version of Boost's serialization libaries working. When I attempt to compile the result is a multitude of Linker errors. After Googling failed to turn up anything I posted the question on Stack Overflow, where a reply suggested there may be 'a bug in Boost.Serialization'. Stack Overflow features nice syntax highlighting so it is easy to see the code, I pieced it together from other normal character examples: http://stackoverflow.com/questions/10439984/serialization-example-of-boost-a...
If there is a rule against posting external links, I apologise. Or if people want me to paste the code directly in to an email for this mailing list I will do so. The Stack Overflow question was originally based on my thought that I had made a mistake in my code. If this IS the case then I do apologise, and I would appreciate knowing just where I've gone wrong.
Regards.
Here is the problem:
#include

It will function without issues you say? That's very useful to know, thanks. Out of interest, why are there wide character versions then if they are unnecessary? Regards.
To: boost-users@lists.boost.org From: ramey@rrsd.com Date: Fri, 4 May 2012 09:57:01 -0800 Subject: Re: [Boost-users] [Serialization] Linker errors issue with using binary_wiarchive.hpp and binary_woarchive.hpp
Lord Metritutus Merkwurdichliebe wrote:
Hello there, I've never used one of these Mailing List conversations before so I apologise for any mistakes.
To the point: I'm having issues trying to get the wide character version of Boost's serialization libaries working. When I attempt to compile the result is a multitude of Linker errors. After Googling failed to turn up anything I posted the question on Stack Overflow, where a reply suggested there may be 'a bug in Boost.Serialization'. Stack Overflow features nice syntax highlighting so it is easy to see the code, I pieced it together from other normal character examples: http://stackoverflow.com/questions/10439984/serialization-example-of-boost-a...
If there is a rule against posting external links, I apologise. Or if people want me to paste the code directly in to an email for this mailing list I will do so. The Stack Overflow question was originally based on my thought that I had made a mistake in my code. If this IS the case then I do apologise, and I would appreciate knowing just where I've gone wrong.
Regards.
Here is the problem: #include
#include These headers exist in the package. They were added in to satisfy my natural predudice for symetry and completeness. However, I've never been able to see why anyone would have a reason to use them. The build doesn't build the corresponding library components and they aren't tested. Think of them as either your appendix or maybe the Higgs Boson of the serialization library.
Just use
#include
#include These should serve your purpose. Note that all the archive classes can save/restore wide char data types. This respects the principle that all archives handle any data type.
Robert Ramey
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Lord Metritutus Merkwurdichliebe wrote:
It will function without issues you say? That's very useful to know, thanks. Out of interest, why are there wide character versions then if they are unnecessary?
They are necessary for text based archives. The "w" means use the wide char in the text. In the context of binary files there is no concept of character. So they don't make sense. But asked why they are there. The reason is this: first I made the text_archive, binary_archive and xml_archive. Then I made the "w" versions by copying the original ones, making some changes and subjecting them to test. So the binary_warchive.. exists because of symetry. Once it was made and tested, I realized it wasn't necessary. I stopped testing it and removed it from the documentation for this reason. BUT I was very concerned about Murphy's law. That is, the moment I eliminate something that is called for by symetry considerations, someone will find a need for it. So I left it in there to make sure that no one ever needs it. Robert Ramey
Regards.
participants (3)
-
Bagnall, Bryan D CIV SPAWARSYSCEN-PACIFIC, 56220
-
Lord Metritutus Merkwurdichliebe
-
Robert Ramey