Hi everyone, so my problem is with serialization and I am trying to implement this using the boost library.
Background info:
*Using Eclipse, but have netbeans installed
*I have been using mingw for my compiler, but I have cygwin and from what I can tell it isn't properly configured since gcc commands do nothing.
*I've installed the boost libraries and then in eclipse linked them.
The issue I am running into is I can not even get the sample boost serialization code to compile properly, so I can attempt to start doing this on my other projects.
The sample code that I have used can be found here.
http://www.boost.org/doc/libs/1_46_1/libs/serialization/doc/tutorial.html
When attempting to compile the code I receive the following errors when compiled with mingw
Description Resource Path Location Type
undefined reference to `boost::archive::basic_text_iprimitive<std::istream>::~basic_text_iprimitive()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::basic_text_oprimitive<std::ostream>::~basic_text_oprimitive()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iarchive::~basic_iarchive()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iarchive::load_object(void*, boost::archive::detail::basic_iserializer const&)' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iserializer::~basic_iserializer()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oarchive::~basic_oarchive()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oarchive::save_object(void const*, boost::archive::detail::basic_oserializer const&)' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oserializer::~basic_oserializer()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::shared_ptr_helper::~shared_ptr_helper()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::detail::shared_ptr_helper::shared_ptr_helper()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::text_iarchive_impl(std::istream&, unsigned int)' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::ostream&, unsigned int)' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::serialization::extended_type_info::key_unregister() const' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::serialization::typeid_system::extended_type_info_typeid_0::~extended_type_info_typeid_0()' try.cpp /mingwTry C/C++ Problem
undefined reference to `boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister()' try.cpp /mingwTry C/C++ Problem
|
When compiled with cygwin I get even more errors.
Description Resource Path Location Type
make: *** [cygwinTry.exe] Error 1 cygwinTry C/C++ Problem
undefined reference to `boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >::~basic_text_iprimitive()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iarchive::~basic_iarchive()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iarchive::load_object(void*, boost::archive::detail::basic_iserializer const&)' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iserializer::~basic_iserializer()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_iserializer::basic_iserializer(boost::serialization::extended_type_info const&)' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oarchive::~basic_oarchive()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oarchive::save_object(void const*, boost::archive::detail::basic_oserializer const&)' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oserializer::~basic_oserializer()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::basic_oserializer::basic_oserializer(boost::serialization::extended_type_info const&)' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::shared_ptr_helper::~shared_ptr_helper()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::detail::shared_ptr_helper::shared_ptr_helper()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::text_iarchive_impl(std::basic_istream<char, std::char_traits<char> >&, unsigned int)' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::basic_ostream<char, std::char_traits<char> >&, unsigned int)' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::serialization::extended_type_info::key_unregister() const' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::serialization::typeid_system::extended_type_info_typeid_0::~extended_type_info_typeid_0()' cygwinTry.cpp /cygwinTry C/C++ Problem
undefined reference to `boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister()' cygwinTry.cpp /cygwinTry C/C++ Problem
|
Now I've only used MinGW to compile stuff previously and I've never had any errors like this, so I really don't know where to begin. I get the feeling it is somehow related to how I am linking the library to the project, but I really have no idea.