[serialization] codecvt_null.cpp not present in windows dlls

Something odd seems to be happening on the Windows platform for the serialization library, in CVS HEAD. All the text based wide-char dynamic library tests are failing as the two functions defined in codecvt_null.cpp are not found by the linkers. I've had a quick play around with the jam files but still don't understand process/library well enough to find a fix (or even casuse of the problem) -- AlisdairM

AlisdairM wrote:
All the text based wide-char dynamic library tests are failing as the two functions defined in codecvt_null.cpp are not found by the linkers.
I've had a quick play around with the jam files but still don't understand process/library well enough to find a fix (or even cause of the problem)
It appears that the do_out and do_in functions in codecvt_null.cpp are not marked to be exported to the DLL (with the __declspec(dllexport) attribute). I didn't look into how this came to be broken, but the attached patch seems to fix the problem on my machine. -Dave

The patch did not work for me. I am trying to work out why the narrow character versions work with dynamic linking, but the wide character versions do not. I guess it is possible all references to these functions are encapsulated inside the narrow char dll itself, so export is not necessary to pass its own tests (and so bad declarations are not exposed) AlisdairM David Deakins wrote:
It appears that the do_out and do_in functions in codecvt_null.cpp are not marked to be exported to the DLL (with the __declspec(dllexport) attribute). I didn't look into how this came to be broken, but the attached patch seems to fix the problem on my machine.
-Dave
Index: codecvt_null.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/archive/codecvt_null.hpp,v retrieving revision 1.15 diff -u -r1.15 codecvt_null.hpp --- codecvt_null.hpp 28 Sep 2006 16:31:49 -0000 1.15 +++ codecvt_null.hpp 16 May 2007 16:47:59 -0000 @@ -20,6 +20,7 @@ #include <cstddef>
#include <boost/config.hpp> +#include <boost/archive/detail/auto_link_archive.hpp>
namespace std{ #if defined(__LIBCOMO__) @@ -56,7 +57,7 @@ template<> class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t> { - virtual std::codecvt_base::result + virtual BOOST_ARCHIVE_OR_WARCHIVE_DECL(std::codecvt_base::result) do_out( std::mbstate_t & state, const wchar_t * first1, @@ -66,7 +67,7 @@ char * last2, char * & next2 ) const; - virtual std::codecvt_base::result + virtual BOOST_ARCHIVE_OR_WARCHIVE_DECL(std::codecvt_base::result) do_in( std::mbstate_t & state, const char * first1,
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- AlisdairM
participants (2)
-
AlisdairM
-
David Deakins