我正在開發一個C++項目,我想使用boost的序列化庫。我從boost的主頁下載並安裝了最新的boost庫。幫助編譯和使用boost C++庫
當我試圖編譯和運行的升壓轉換器的演示序列化的例子之一,我得到了這個樣子各種錯誤:
/usr/local/include/boost/archive/detail/iserializer.hpp:173: undefined reference to `boost::archive::archive_exception::~archive_exception()'
./demo.o: In function `void boost::archive::detail::save_non_pointer_type<boost::archive::text_oarchive>::save_standard::invoke<bus_schedule::trip_info>(boost::archive::text_oarchive&, bus_schedule::trip_info const&)':
/usr/local/include/boost/archive/detail/oserializer.hpp:253: undefined reference to `boost::archive::detail::basic_oarchive::save_object(void const*, boost::archive::detail::basic_oserializer const&)'
./demo.o: In function `void boost::archive::save_access::end_preamble<boost::archive::text_oarchive>(boost::archive::text_oarchive&)':
/usr/local/include/boost/archive/detail/oserializer.hpp:83: undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
./demo.o: In function `void boost::archive::detail::load_pointer_type<boost::archive::text_iarchive>::invoke<bus_route*>(boost::archive::text_iarchive&, bus_route*&)':
/usr/local/include/boost/archive/detail/iserializer.hpp:518: undefined reference to `boost::archive::detail::basic_iarchive::load_pointer(void*&, boost::archive::detail::basic_pointer_iserializer const*, boost::archive::detail::basic_pointer_iserializer const* (*)(boost::serialization::extended_type_info const&))'
./demo.o: In function `void boost::archive::detail::save_pointer_type<boost::archive::text_oarchive>::non_polymorphic::save<bus_route>(boost::archive::text_oarchive&, bus_route&)':
我新的C++和促進所以任何幫助,將不勝感激。
謝謝
@ user475505鏈接器錯誤。檢查你是否添加了鏈接庫。 – yadab 2010-10-14 08:39:13