Public bug reported:

Binary package hint: libboost-serialization-dev

I am attempting to use boost serialization in Edgy Eft, but I cannot get
even a simple test to link properly.  I had files to attach, but I don't
see how to do that.  I get pages of linker errors like this:

// BEGIN error messages
/tmp/ccd96NVf.o: In function 
`boost::archive::text_oarchive::text_oarchive(std::basic_ostream<char, 
std::char_traits<char> >&, unsigned int)':
main.cpp:(.text._ZN5boost7archive13text_oarchiveC1ERSoj[boost::archive::text_oarchive::text_oarchive(std::basic_ostream<char,
 std::char_traits<char> >&, unsigned int)]+0x1b): 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)'
/tmp/ccd96NVf.o: In function 
`boost::archive::detail::common_oarchive<boost::archive::text_oarchive>::~common_oarchive()':
main.cpp:(.text._ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEED2Ev[boost::archive::detail::common_oarchive<boost::archive::text_oarchive>::~common_oarchive()]+0x17):
 undefined reference to 
`boost::archive::detail::basic_oarchive::~basic_oarchive()'
/tmp/ccd96NVf.o: In function 
`boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl()':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEED2Ev[boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl()]+0x39):
 undefined reference to 
`boost::archive::basic_text_oprimitive<std::basic_ostream<char, 
std::char_traits<char> > >::~basic_text_oprimitive()'
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEED2Ev[boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl()]+0x62):
 undefined reference to 
`boost::archive::basic_text_oprimitive<std::basic_ostream<char, 
std::char_traits<char> > >::~basic_text_oprimitive()'
// END error messages


Here is my sample main.cpp code:

// BEGIN main.cpp
#include <string>
#include <fstream>
#include <iostream>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/utility.hpp>
#include <boost/serialization/serialization.hpp>

int main(int argv, char** argc) {
  std::ofstream s("./test.txt", std::ios::out|std::ios::binary);
  boost::archive::text_oarchive oa(s);

  //oa << 5;

  return 0;
}
// END main.cpp


I am compiling/linking it with this command:

g++ -Wall -Werror -lboost_serialization -o Test main.cpp


I have everything in Synaptic named "libboost-*" installed already.  It seems 
like I need another library linked in, but can't figure out what it should be.  
There is not libboost_archive library that I can see.  I thought perhaps 
"-lboost_filesystem" would do it, but that doesn't help.  Another Ubuntu user 
has reproduced this, so I believe I am either doing something dumb or there is 
a bug in the library.

Please let me know what you think, thanks for the help.

** Affects: boost (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
Cannot build simple test app using boost serialization
https://launchpad.net/bugs/74186

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to