boost::serialization - duplicate symbol from portable_binary_*archive

::find(boost::serialization::extended_type_info const&)in /Users/jo/ Documents/packet_serialization_test/build/ orchid_packet_serialization.build/Debug/
If you include the file "portable_binary_iarchive.hpp" or "portable_binary_oarchive.hpp" in a common header the result is: ld: duplicate symbol boost ::archive ::detail ::archive_pointer_iserializer < portable_binary_iarchive packet_serialization_test.build/Objects-normal/i386/packet_base.o and / Users/jo/Documents/packet_serialization_test/build/ orchid_packet_serialization.build/Debug/ packet_serialization_test.build/Objects-normal/i386/main.o

Never-mind, it wasn't intended to be used as a header lib. :-) On Apr 18, 2008, at 9:03 AM, j.c. wrote:
If you include the file "portable_binary_iarchive.hpp" or "portable_binary_oarchive.hpp" in a common header the result is:
::find(boost::serialization::extended_type_info const&)in /Users/jo/ Documents/packet_serialization_test/build/ orchid_packet_serialization.build/Debug/
ld: duplicate symbol boost ::archive ::detail ::archive_pointer_iserializer < portable_binary_iarchive packet_serialization_test.build/Objects-normal/i386/packet_base.o and / Users/jo/Documents/packet_serialization_test/build/ orchid_packet_serialization.build/Debug/ packet_serialization_test.build/Objects-normal/i386/main.o
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

const packet_base test1; packet_base test2; std::stringstream ss; { portable_binary_oarchive pboa(ss); pboa << test1; std::cout << "str: " << ss.str() << " size: " << ss.str().size() << std::endl; } { portable_binary_iarchive pbia(ss); pbia >> test2; std::cout << "str: " << ss.str() << " size: " << ss.str().size() << std::endl; } std::stringstream ss_out; // These are either 2 x 8 byte integers or 1 x 16 byte integer, prob the later. Are they signed or unsigned, etc??? ss_out << ss.str()[0]; ss_out << ss.str()[1]; std::cout << "str: " << ss_out.str() << " size: " << ss_out.str().size() << std::endl; assert(test1 == test2);

j.c. wrote:
std::stringstream ss_out; // These are either 2 x 8 byte integers or 1 x 16 byte integer, prob the later. Are they signed or unsigned, etc??? ss_out << ss.str()[0]; ss_out << ss.str()[1];
Good morning, I suspect it to be the serialization library version. It's the same information the native binary_oarchive generates when called with the no_header flag. Christian

j.c. wrote:
If you include the file "portable_binary_iarchive.hpp" or "portable_binary_oarchive.hpp" in a common header the result is:
ld: duplicate symbol [...]
Hello JC, does this also occur if you replace the archives with binary_[io]archive? Please keep in mind that portable binary archive really is a thin layer on top of the native binary archive, so naturally they mimik their behaviour. I suspect this to be a boost::serialization issue; I never ran into the linker problem you describe. Regards, Christian
participants (2)
-
j.c.
-
Pfligersdorffer, Christian