← Back to team overview

yade-dev team mailing list archive

Re: QT gui tree serialization archive

 

Robert Ramey said:     (by the date of Sun, 2 May 2010 08:27:14 -0800)

Thank you for your help Robert,

> ***
> boost/type_traits/is_abstract.hpp was created with a different purpose
> Then the old is_abstract so I had to change the library to include
> Boost/serialization/assume_abstract.hpp instead.

so I changed the
  #include <boost/serialization/is_abstract.hpp>
into
  #include <boost/serialization/assume_abstract.hpp>

and I changed
  BOOST_IS_ABSTRACT(bus_stop)
into
  BOOST_SERIALIZATION_ASSUME_ABSTRACT(bus_stop)

> ****
> I was badgered by the boost powers that be to move these files from the
> boost
> Directory/namespace to boost/serialization ...


so I changed 
  #include <boost/pfto.hpp>
into
  #include <boost/serialization/pfto.hpp>

and
  #include <boost/state_saver.hpp>
into
  #include <boost/serialization/state_saver.hpp>

Then I had another error in libs/serialization/src/tree_[io]archive.cpp

and I had to change
  #include <boost/archive/impl/archive_pointer_iserializer.ipp>
  ...
  template class detail::archive_pointer_iserializer<tree_iarchive> ;

into

  #include <boost/archive/impl/archive_serializer_map.ipp>
  ...
  template class detail::archive_serializer_map<tree_iarchive> ;

The same for oarchive.

Then I had some linker error complaining about boost_system, so
I added -lboost_system link option.

But then I started getting linker errors:

/usr/bin/ld: tree_iarchive.o: in function
boost::archive::tree_iarchive_impl<boost::archive::tree_iarchive>::load(char*):tree_iarchive.cpp(.text._ZN5boost7archive18tree_iarchive_implINS0_13tree_iarchiveEE4loadEPc+0x17):
error: undefined reference to 'tree<char>::get_value(tree_node<char>
const*)'

So it seems that class tree<char> isn't anywhere reachable for the
linker. I doubt that my solution is correct, because I added two
explicit instatinations of this class in
libs/serialization/src/tree_oarchive.cpp and in
libs/serialization/src/tree_iarchive.cpp
as:
  template class tree<char>;

(outside of any namespaces, just at the end of the file)

If I added it in only one of those, then the second one won't compile.

So after all those fixes (are they correct?). It is compiling. But
still something is wrong. The tree view is empty. So now we need to
figure out if it doesn't work due to changes in qt4 or still there's
something unfixed about boost::serialization.

I am attaching, the current, modified version.

Can you please comment on that?
-- 
# Janek Kozicki                              http://janek.kozicki.pl/

Attachment: 10-boost-serialization-1.42-qt4-gui-tree.zip
Description: Zip archive


Follow ups

References