Boost logo

Boost Interest :

Subject: [Boost-cmake] [Serialization] BUILD_BOOST_WSERIALIZATION appears to be ignored by Boost.CMake
From: Brian Davis (bitminer_at_[hidden])
Date: 2010-10-26 16:28:10


A grep of boost-cmake-1_41_0

$ grep -R WSERIALIZATION *
boost-cmake-1_41_0/tools/build/CMake/docs/build/html/build_configuration.html:BUILD_BOOST_WSERIALIZATION
ON
boost-cmake-1_41_0/tools/build/CMake/docs/build/html/_sources/build_configuration.txt:
BUILD_BOOST_WSERIALIZATION ON
boost-cmake-1_41_0/tools/build/CMake/docs/source/build_configuration.rst:
BUILD_BOOST_WSERIALIZATION ON

so it only appears in the documentation

And lowercase search results in:
 grep -R wserialization *
boost-cmake-1_41_0/boost/archive/detail/auto_link_warchive.hpp:#define
BOOST_LIB_NAME boost_wserialization
boost-cmake-1_41_0/Jamroot:explicit-alias wserialization :
libs/serialization/build//boost_wserialization ;
boost-cmake-1_41_0/libs/serialization/build/Jamfile.v2:lib
boost_wserialization
boost-cmake-1_41_0/libs/serialization/build/Jamfile.v2:boost-install
boost_serialization boost_wserialization ;
boost-cmake-1_41_0/libs/serialization/src/CMakeLists.txt:boost_add_library(wserialization
boost-cmake-1_41_0/libs/serialization/test/CMakeLists.txt:
set(BSL_TEST_LIBRARIES "boost_wserialization" ${BSL_TEST_LIBRARIES})
boost-cmake-1_41_0/libs/serialization/util/test.jam:
../build//boost_wserialization
boost-cmake-1_41_0/libs/serialization/vc7ide/LibraryW.vcproj:
OutputFile="$(ConfigurationName)\boost_wserialization-vc71-mt-gd-1_41.dll"
boost-cmake-1_41_0/libs/serialization/vc7ide/LibraryW.vcproj:
OutputDirectory=""$(ProjectDir)..\..\..\bin\boost\libs\serialization\build\libboost_wserialization.lib\msvc-7.1\release\threading-multi\link-static""
boost-cmake-1_41_0/libs/serialization/vc7ide/LibraryW.vcproj:
OutputFile="$(ConfigurationName)\libboost_wserialization-vc71-mt-sgd-1_41.lib"/>
boost-cmake-1_41_0/tools/build/CMake/install_me/BoostConfig.cmake:
set(Boost_FIND_COMPONENTS
"filesystem;system;wserialization;thread;date_time")

so no dice.

This appears to be confirmed by:

https://svn.boost.org/trac/boost/ticket/3757

A simple addition of if/endif wrap of wserialization in
boost-cmake-1_41_0/libs/serialization/src/CMakeLists.txt:

if( BUILD_BOOST_WSERIALIZATION )
boost_add_library(wserialization

  basic_text_wiprimitive.cpp
  basic_text_woprimitive.cpp
  text_wiarchive.cpp
  text_woarchive.cpp
  utf8_codecvt_facet.cpp
  xml_wgrammar.cpp
  xml_wiarchive.cpp
  xml_woarchive.cpp
  codecvt_null.cpp

  SHARED_COMPILE_FLAGS -DBOOST_SERIALIZATION_DYN_LINK=1
  DEPENDS boost_serialization
  )
endif()

makes it go poofdy.... gone.

and the unified diff:

--- libs/serialization/src/CMakeLists.txt Mon Jan 19 16:26:36 1970
+++ libs/serialization/src/CMakeLists.txt Mon Jan 19 16:26:36 1970
@@ -39,6 +39,7 @@
   SHARED_COMPILE_FLAGS -DBOOST_SERIALIZATION_DYN_LINK=1
   )

+if( BUILD_BOOST_WSERIALIZATION )
 boost_add_library(wserialization

   basic_text_wiprimitive.cpp
@@ -54,3 +55,4 @@
   SHARED_COMPILE_FLAGS -DBOOST_SERIALIZATION_DYN_LINK=1
   DEPENDS boost_serialization
   )
+endif()
\ No newline at end of file

I would like to know why wide char serialization is not working or how I and
get it to work on VS2008 what I get is:

3>xml_wgrammar.obj : warning LNK4049: locally defined symbol
??_Darchive_exception_at_archive@boost@@QEAAXXZ (public: void __cdecl
boost::archive::archive_exception::`vbase destructor'(void)) imported
3>xml_wiarchive.obj : warning LNK4049: locally defined symbol
??_Darchive_exception_at_archive@boost@@QEAAXXZ (public: void __cdecl
boost::archive::archive_exception::`vbase destructor'(void)) imported
3>xml_woarchive.obj : warning LNK4049: locally defined symbol
??_Darchive_exception_at_archive@boost@@QEAAXXZ (public: void __cdecl
boost::archive::archive_exception::`vbase destructor'(void)) imported
...
...
... yes there appears to be gobs and gobs more of this where ever this came
from.
...
...
3>xml_wiarchive.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: unsigned int __cdecl
boost::archive::detail::basic_iarchive::get_flags(void)const "
(__imp_?get_flags_at_basic_iarchive_at_detail@archive_at_boost@@QEBAIXZ) referenced
in function "protected: void __cdecl
boost::archive::basic_xml_iarchive<class
boost::archive::naked_xml_wiarchive>::load_end(char const *)" (?load_end@
?$basic_xml_iarchive_at_Vnaked_xml_wiarchive_at_archive@boost@@@archive_at_boost
@@IEAAXPEBD_at_Z)



Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk