Boost logo

Boost :

From: David Deakins (ddeakins_at_[hidden])
Date: 2007-09-26 23:48:52


Currently, there are a small collection of bugs in the trunk version of
Boost.Serialization that prevent the libraries from compiling as a
Windows DLL. Most of these problems relate to missing
dllimport/dllexport directives or, in a couple places, to directives
that shouldn't be there. Attached are patches to several files to
correct these issues.

Thanks,
-Dave

Index: codecvt_null.cpp
===================================================================
--- codecvt_null.cpp (revision 39562)
+++ codecvt_null.cpp (working copy)
@@ -7,6 +7,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_ARCHIVE_SOURCE
 #include <boost/archive/codecvt_null.hpp>
 
 // codecvt implementation for passing wchar_t objects to char output

Index: codecvt_null.hpp
===================================================================
--- codecvt_null.hpp (revision 39562)
+++ codecvt_null.hpp (working copy)
@@ -20,6 +20,7 @@
 #include <cstddef>
 
 #include <boost/config.hpp>
+#include <boost/archive/detail/auto_link_archive.hpp>
 
 namespace std{
     #if defined(__LIBCOMO__)
@@ -58,7 +59,7 @@
 template<>
 class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
 {
- virtual std::codecvt_base::result
+ virtual BOOST_ARCHIVE_DECL(std::codecvt_base::result)
     do_out(
         std::mbstate_t & state,
         const wchar_t * first1,
@@ -68,7 +69,7 @@
         char * last2,
         char * & next2
     ) const;
- virtual std::codecvt_base::result
+ virtual BOOST_ARCHIVE_DECL(std::codecvt_base::result)
     do_in(
         std::mbstate_t & state,
         const char * first1,

Index: interface_iarchive.hpp
===================================================================
--- interface_iarchive.hpp (revision 39562)
+++ interface_iarchive.hpp (working copy)
@@ -32,7 +32,7 @@
 namespace archive {
 namespace detail {
 
-class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
+class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
 
 template<class Archive>
 class interface_iarchive
@@ -51,9 +51,9 @@
     }
 
     template<class T>
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer *
+ const basic_pointer_iserializer *
     register_type(T * = NULL){
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer & bpis =
+ const basic_pointer_iserializer & bpis =
             pointer_iserializer<Archive, T>::get_instance();
         this->This()->register_basic_serializer(bpis.get_basic_serializer());
         return & bpis;

Index: interface_oarchive.hpp
===================================================================
--- interface_oarchive.hpp (revision 39562)
+++ interface_oarchive.hpp (working copy)
@@ -32,7 +32,7 @@
 namespace archive {
 namespace detail {
 
-class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
+class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
 
 template<class Archive>
 class interface_oarchive
@@ -51,9 +51,9 @@
     }
 
     template<class T>
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer *
+ const basic_pointer_oserializer *
     register_type(const T * = NULL){
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer & bpos =
+ const basic_pointer_oserializer & bpos =
             pointer_oserializer<Archive, T>::get_instance();
         this->This()->register_basic_serializer(bpos.get_basic_serializer());
         return & bpos;

Index: basic_oarchive.hpp
===================================================================
--- basic_oarchive.hpp (revision 39562)
+++ basic_oarchive.hpp (working copy)
@@ -71,16 +71,15 @@
 public:
     // note: NOT part of the public interface
     void register_basic_serializer(
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer & bos
+ const basic_oserializer & bos
     );
     void save_object(
         const void *x,
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer & bos
+ const basic_oserializer & bos
     );
     void save_pointer(
         const void * t,
- const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
- basic_pointer_oserializer * bpos_ptr
+ const basic_pointer_oserializer * bpos_ptr
     );
     void save_null_pointer(){
         vsave(NULL_POINTER_TAG);


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk