Boost logo

Boost Users :

From: Miguel Silvestre (msilvestre_at_[hidden])
Date: 2007-01-11 12:48:03


Here is my cpp file

#if (defined _MSC_VER) && (_MSC_VER == 1200)
# pragma warning (disable : 4786) // too long name, harmless warning
#endif

#define BOOST_ARCHIVE_SOURCE

#include "core/system/Precompiled.h"

#include "core/serialization/TextSerializer.h"

// explicitly instantiate for this type of text stream
#include <boost/archive/impl/basic_text_oarchive.ipp>
#include <boost/archive/impl/text_oarchive_impl.ipp>
#include <boost/archive/impl/archive_pointer_oserializer.ipp>
/*
#include <boost/archive/impl/basic_text_iarchive.ipp>
#include <boost/archive/impl/text_iarchive_impl.ipp>
#include <boost/archive/impl/archive_pointer_iserializer.ipp>
*/

namespace FlowEngine
{
        //template class basic_text_oprimitive<std::ostream> ;
        template class boost::archive::basic_text_oarchive<TextArchiveO> ;
        template class boost::archive::text_oarchive_impl<TextArchiveO> ;
        template class
boost::archive::detail::archive_pointer_oserializer<TextArchiveO> ;

        /*
        template class boost::archive::basic_text_iarchive<TextArchiveI> ;
        template class boost::archive::text_iarchive_impl<TextArchiveI> ;
        template class
boost::archive::detail::archive_pointer_iserializer<TextArchiveI> ;
        */
}

On 1/11/07, Miguel Silvestre <msilvestre_at_[hidden]> wrote:
> Hummm.. good point.
>
> But now I'm getting these compilation errors:
> IT says that the functions template are already defined :S.
> I wonder where.....
>
> d:\flow project\flowengine\3rdparty\include\boost\archive\impl\basic_text_oarchive.ipp(48)
> : error C2995: 'void
> boost::archive::basic_text_oarchive<Archive>::newtoken(void)' :
> function template has already been defined
> d:\flow
> project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(72)
> : see declaration of
> 'boost::archive::basic_text_oarchive<Archive>::newtoken'
> d:\flow project\flowengine\3rdparty\include\boost\archive\impl\basic_text_oarchive.ipp(59)
> : error C2995: 'void
> boost::archive::basic_text_oarchive<Archive>::init(void)' : function
> template has already been defined
> d:\flow
> project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(103)
> : see declaration of
> 'boost::archive::basic_text_oarchive<Archive>::init'
> d:\flow project\flowengine\3rdparty\include\boost\archive\impl\archive_pointer_oserializer.ipp(26)
> : error C2995: 'boost::archive::detail::basic_serializer_map
> *boost::archive::detail::oserializer_map(void)' : function template
> has already been defined
> d:\flow
> project\flowengine\3rdparty\include\boost\archive\impl\archive_pointer_oserializer.ipp(22)
> : see declaration of 'boost::archive::detail::oserializer_map'
> d:\flow project\flowengine\3rdparty\include\boost\archive\impl\archive_pointer_oserializer.ipp(38)
> : error C2995: 'boost::archive::detail::archive_pointer_oserializer<Archive>::archive_pointer_oserializer(const
> boost::serialization::extended_type_info &)' : function template has
> already been defined
> d:\flow
> project\flowengine\3rdparty\include\boost\archive\detail\archive_pointer_oserializer.hpp(40)
> : see declaration of
> 'boost::archive::detail::archive_pointer_oserializer<Archive>::archive_pointer_oserializer'
> d:\flow project\flowengine\3rdparty\include\boost\archive\impl\archive_pointer_oserializer.ipp(48)
> : error C2995: 'const
> boost::archive::detail::basic_pointer_oserializer
> *boost::archive::detail::archive_pointer_oserializer<Archive>::find(const
> boost::serialization::extended_type_info &)' : function template has
> already been defined
> d:\flow
> project\flowengine\3rdparty\include\boost\archive\detail\archive_pointer_oserializer.hpp(56)
> : see declaration of
> 'boost::archive::detail::archive_pointer_oserializer<Archive>::find'
> d:\flow project\flowengine\3rdparty\include\boost\archive\impl\archive_pointer_oserializer.ipp(59)
> : error C2995: 'boost::archive::detail::archive_pointer_oserializer<Archive>::~archive_pointer_oserializer(void)'
> : function template has already been defined
> d:\flow
> project\flowengine\3rdparty\include\boost\archive\detail\archive_pointer_oserializer.hpp(48)
> : see declaration of
> 'boost::archive::detail::archive_pointer_oserializer<Archive>::~archive_pointer_oserializer'
>
>
> On 1/11/07, Robert Ramey <ramey_at_[hidden]> wrote:
> > Miguel Silvestre wrote:
> > > a) But I'm deriving it from text_archive_imp
> >
> > Sorry, I didn't see that - the IArchive threw me for a loop.
> >
> > Look for the explicit instantiation at the bottom of text_oarchive.cpp.
> > Include something similar in your own code.
> >
> > Robert Ramey
> >
> >
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
>
>
> --
> Miguel Silvestre
>

-- 
Miguel Silvestre

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net