Keith Laband | 19 Nov 19:55 2012
Picon

Adding Boost.Log to CMake Boost

I have tried adding Boost.Log to Cmake Boost. I am using CMake 2.8.8 and the latest Boost.Log files from the trunk directory. It seems to build the libraries okay, but when I try to link my program I get the following.

/media/data/workspace/mdxdev/tmp/staging/i686-mv-linux/usr/lib/libcls_utils.so: undefined reference to `boost::log_mt_posix::sinks::basic_text_file_backend<char>::construct(boost::filesystem2::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem2::path_traits> const&, std::_Ios_Openmode, unsigned long long, boost::function0<bool> const&, bool)'

------

libcls_utils.so is a wrapper around the Boost.Log libraries that I am calling. The shareable library compiles and links. When my main program goes to link, it get the libcls_utils.so, but can not resolve a symbol in it. I believe I have traced it down to something I may have missed when creating the CMakeLists.txt files.  Here is a list of what I have. I used the Jamfile.v2 created by bjam to figure out what to include in my CMakeLists.txt file.

#
#          Copyright Andrey Semashev 2007 - 2012.
# Distributed under the Boost Software License, Version 1.0.
#    (See accompanying file LICENSE_1_0.txt or copy at
#          http://www.boost.org/LICENSE_1_0.txt)
#

import os ;
import feature ;

lib psapi ;
lib ws2_32 ;

local rule default_logapi ( )
{
    local api = unix ;
    if [ os.name ] = "NT" { api = winnt ; }
    return $(api) ;
}

feature.feature logapi : unix winnt : propagated ;
feature.set-default logapi : [ default_logapi ] ;

project boost/log
    : source-location ../src
    : requirements
        <link>shared:<define>BOOST_LOG_DLL
        <logapi>unix:<define>BOOST_LOG_USE_NATIVE_SYSLOG=1
        <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
        <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
        <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
        <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
        <toolset>intel-win:<define>_SCL_SECURE_NO_WARNINGS
        <toolset>intel-win:<define>_SCL_SECURE_NO_DEPRECATE
        <toolset>intel-win:<define>_CRT_SECURE_NO_WARNINGS
        <toolset>intel-win:<define>_CRT_SECURE_NO_DEPRECATE
        <toolset>gcc:<cxxflags>-fno-strict-aliasing  # avoids strict aliasing violations in other Boost components
        <toolset>gcc-mingw:<linkflags>-Wl,--enable-auto-import
        <toolset>gcc-cygwin:<linkflags>-Wl,--enable-auto-import
        <library>/boost/date_time//boost_date_time
        <library>/boost/filesystem//boost_filesystem
        <library>/boost/system//boost_system
        <threading>single:<define>BOOST_LOG_NO_THREADS
        <threading>multi:<library>/boost/thread//boost_thread
    ;

DEPENDS event_log_backend.cpp : simple_event_log.mc ;

local BOOST_LOG_COMMON_SRC =
    attribute_name.cpp
    attribute_set.cpp
    attribute_values_view.cpp
    code_conversion.cpp
    core.cpp
    record_ostream.cpp
    severity_level.cpp
    global_logger_storage.cpp
    named_scope.cpp
    process_id.cpp
    thread_id.cpp
    timer.cpp
    exceptions.cpp
    default_sink.cpp
    text_ostream_backend.cpp
    text_file_backend.cpp
    syslog_backend.cpp
    thread_specific.cpp
    once_block.cpp
    timestamp.cpp
    threadsafe_queue.cpp
    event.cpp
    trivial.cpp
    ;

lib boost_log
    : ## sources ##
        $(BOOST_LOG_COMMON_SRC)
      ## winnt sources ##
        simple_event_log.mc
        event_log_backend.cpp
        debug_output_backend.cpp
        light_rw_mutex.cpp
        psapi
        ws2_32
    : ## requirements ##
        <define>BOOST_LOG_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <logapi>winnt
    ;

lib boost_log
    : ## sources ##
        $(BOOST_LOG_COMMON_SRC)
      ## unix sources ##
    : ## requirements ##
        <define>BOOST_LOG_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <logapi>unix
    ;


local BOOST_LOG_SETUP_COMMON_SRC =
    parser_utils.cpp
    init_from_stream.cpp
    init_from_settings.cpp
    filter_parser.cpp
    formatter_parser.cpp
    default_filter_factory.cpp
    ;

lib boost_log_setup
    : ## sources ##
        $(BOOST_LOG_SETUP_COMMON_SRC)
      ## winnt sources ##
        ws2_32
    : ## requirements ##
        <link>shared:<define>BOOST_LOG_SETUP_DLL
        <define>BOOST_LOG_SETUP_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <library>boost_log
        <logapi>winnt
    ;

lib boost_log_setup
    : ## sources ##
        $(BOOST_LOG_SETUP_COMMON_SRC)
      ## unix sources ##
    : ## requirements ##
        <link>shared:<define>BOOST_LOG_SETUP_DLL
        <define>BOOST_LOG_SETUP_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <library>boost_log
        <logapi>unix
    ;

------------------------------------

My Cmake file in the Log top level directory is

#
#          Copyright Andrey Semashev 2007 - 2012.
# Distributed under the Boost Software License, Version 1.0.
#    (See accompanying file LICENSE_1_0.txt or copy at
#          http://www.boost.org/LICENSE_1_0.txt)
#

import os ;
import feature ;

lib psapi ;
lib ws2_32 ;

local rule default_logapi ( )
{
    local api = unix ;
    if [ os.name ] = "NT" { api = winnt ; }
    return $(api) ;
}

feature.feature logapi : unix winnt : propagated ;
feature.set-default logapi : [ default_logapi ] ;

project boost/log
    : source-location ../src
    : requirements
        <link>shared:<define>BOOST_LOG_DLL
        <logapi>unix:<define>BOOST_LOG_USE_NATIVE_SYSLOG=1
        <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
        <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
        <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
        <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
        <toolset>intel-win:<define>_SCL_SECURE_NO_WARNINGS
        <toolset>intel-win:<define>_SCL_SECURE_NO_DEPRECATE
        <toolset>intel-win:<define>_CRT_SECURE_NO_WARNINGS
        <toolset>intel-win:<define>_CRT_SECURE_NO_DEPRECATE
        <toolset>gcc:<cxxflags>-fno-strict-aliasing  # avoids strict aliasing violations in other Boost components
        <toolset>gcc-mingw:<linkflags>-Wl,--enable-auto-import
        <toolset>gcc-cygwin:<linkflags>-Wl,--enable-auto-import
        <library>/boost/date_time//boost_date_time
        <library>/boost/filesystem//boost_filesystem
        <library>/boost/system//boost_system
        <threading>single:<define>BOOST_LOG_NO_THREADS
        <threading>multi:<library>/boost/thread//boost_thread
    ;

DEPENDS event_log_backend.cpp : simple_event_log.mc ;

local BOOST_LOG_COMMON_SRC =
    attribute_name.cpp
    attribute_set.cpp
    attribute_values_view.cpp
    code_conversion.cpp
    core.cpp
    record_ostream.cpp
    severity_level.cpp
    global_logger_storage.cpp
    named_scope.cpp
    process_id.cpp
    thread_id.cpp
    timer.cpp
    exceptions.cpp
    default_sink.cpp
    text_ostream_backend.cpp
    text_file_backend.cpp
    syslog_backend.cpp
    thread_specific.cpp
    once_block.cpp
    timestamp.cpp
    threadsafe_queue.cpp
    event.cpp
    trivial.cpp
    ;

lib boost_log
    : ## sources ##
        $(BOOST_LOG_COMMON_SRC)
      ## winnt sources ##
        simple_event_log.mc
        event_log_backend.cpp
        debug_output_backend.cpp
        light_rw_mutex.cpp
        psapi
        ws2_32
    : ## requirements ##
        <define>BOOST_LOG_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <logapi>winnt
    ;

lib boost_log
    : ## sources ##
        $(BOOST_LOG_COMMON_SRC)
      ## unix sources ##
    : ## requirements ##
        <define>BOOST_LOG_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <logapi>unix
    ;


local BOOST_LOG_SETUP_COMMON_SRC =
    parser_utils.cpp
    init_from_stream.cpp
    init_from_settings.cpp
    filter_parser.cpp
    formatter_parser.cpp
    default_filter_factory.cpp
    ;

lib boost_log_setup
    : ## sources ##
        $(BOOST_LOG_SETUP_COMMON_SRC)
      ## winnt sources ##
        ws2_32
    : ## requirements ##
        <link>shared:<define>BOOST_LOG_SETUP_DLL
        <define>BOOST_LOG_SETUP_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <library>boost_log
        <logapi>winnt
    ;

lib boost_log_setup
    : ## sources ##
        $(BOOST_LOG_SETUP_COMMON_SRC)
      ## unix sources ##
    : ## requirements ##
        <link>shared:<define>BOOST_LOG_SETUP_DLL
        <define>BOOST_LOG_SETUP_BUILDING_THE_LIB=1
        <define>BOOST_THREAD_DONT_USE_CHRONO=1 # Don't introduce false dependency on Boost.Chrono
        <library>boost_log
        <logapi>unix
    ;

------

And finally my CMakeList.txt file in the src directory is:

#
# Copyright Troy D. Straszheim
#
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
#

boost_add_library(log

  attribute_set.cpp
  attribute_values_view.cpp
  slim_string.cpp
  code_conversion.cpp
  core.cpp
  stream_provider.cpp
  severity_level.cpp
  global_logger_storage.cpp
  named_scope.cpp
  process_id.cpp
  timer.cpp
  exceptions.cpp
  sink_frontends.cpp
  text_ostream_backend.cpp
  text_file_backend.cpp
  syslog_backend.cpp
  thread_specific.cpp
  trivial.cpp

  SHARED_COMPILE_FLAGS -DBOOST_LOG_DYN_LINK=1
  SHARED_COMPILE_FLAGS -DBOOST_THREAD_DONT_USE_CHRONO=1
  )

boost_add_library(log_setup

  parser_utils.cpp
  init_from_stream.cpp
  init_from_settings.cpp
  filter_parser.cpp
  formatter_parser.cpp
  default_filter_factory.cpp

  SHARED_COMPILE_FLAGS -DBOOST_LOG_DYN_LINK=1
  SHARED_COMPILE_FLAGS -DBOOST_THREAD_DONT_USE_CHRONO=1
  )

----

Thanks for any help that may be rendered.

Keith

_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Tan, Tom (Shanghai | 31 Jan 03:22 2012
Picon

CMake wrongly generates x64 VC10 project files when Boost default stage folder is used for x32

I reported to CMake a bug  concerning Boost, not building Boost itself but a linking to it. I  was then suggested to post here first. Can you please take a look? I am too new to CMake to figure whose bug it actually belong.

 

http://www.cmake.org/Bug/view.php?id=12918

 

Thanks.

_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Petr Machata | 16 Jan 22:50 2012
Picon

CMake Boost and test cases

Hi there,

I was trying to run tests in the CMake-ified boost, and found that many
tests fail even to configure.

Often what happens is that shared-build test requests a component that
is only build statically.  These seem relatively easy, if tedious to
fix--you just have to construct the name of full dependency, with
explicit -static- or -shared- marker.  I added in an include file that
contains this logic for boost_test_exec_monitor, because many modules
request that.

After fixing all these, another issue came up: in some modules,
e.g. phoenix, the list of tests only includes directories, and
boost_test_run is then run with the directory as an argument, which
fails at config time.  These are less straightforward to fix.  I can
expand this into list of files easily enough.  But some tests are
compile only, some should be run, some are expected to pass, others to
fail, and it's not immediately clear which are which.  Then there are
test monitors, and presumably some tests will define functions like
cpp_main instead of mere main, and these should be linked with the
monitor library...  I _think_ I fixed phoenix, but it's hard to tell,
because I didn't get clean config, and therefore didn't attempt to run
anything.  It should at least be less broken.  I gave up after phoenix.

Hmm, so, is this a known thing?  Perhaps I'm just missing some magic
that makes it all work.  I know cmake boost is in a lot of flux, so
chances are this area just needs some work.

(I'll attach a patch.  I can form the same as git pull request if that's
preferred.)

Thanks,
PM
_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Mourad | 5 Jan 15:10 2012

About BoostConfig*.cmake

Hi,

I hope this is the right place to send requests/"bug" reports about
boost-cmake project.

I'm using boost-cmake to build boost installers for Windows (using
cpack + NSIS). I noticed that recent versions of CMake can find boost
either in a "module" mode or a "config" mode. The problem I have is
about the config mode. In fact, in the generated BoostConfig*.cmake
files, the include/library dirs paths are hardcoded with the value of
CMAKE_INSTALL_PREFIX.

These hardcoded paths make the config mode of find_package(Boost...)
fail whenever Boost is installed (via my generated installer) to a
different folder than CMAKE_INSTALL_PREFIX used when building boost.
So, I suggest to avoid hardcoded paths, and prefer using relative
paths instead. Since Boost_DIR will be set to the location of
BoostConfig.cmake, we can retrieve the include/library dirs from
Boost_DIR.

Cheers,
Mourad
"C. Bergström" | 16 Sep 13:03 2011

Dead project?


Did this project die last July or what?  Anyone interested to keep it 
going... ?  Feel free to email me privately if you prefer not to post 
blunt truth to the list..

Thanks
boost | 15 Sep 21:20 2011

Cross Compile for Windows CE

Hello.
 
I need to compile Boost for Windows CE. This is unfortunate, since there are two things I know nearly nothing about: Boost.Build, and Windows development. The release notes of 1.47 indicate that it has been successfully compiled for Windows CE using STLport, but that was using Boost.Build and for reasons I won't go into here (wrong mailing list), it didn't work for me. Thankfully, my problems with Boost.Build can be helped by the existence of the CMake project for Boost (thanks!). Since I don't know much about Windows, I thought I'd try and use CEgcc on Linux.
 
I feel like I'm making good progress, but I eventually hit this error:
 
boost/config/requires_threads.hpp:47:5: error: #error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
 
-mthreads is part of the C and CXX flags-- the problem is that BOOST_PLATFORM_CONFIG is not defined by boost/config/select_platform_config.hpp. What should this be defined to for Windows CE? I figured it should be boost/config/platform/win32.hpp (which would then define BOOST_HAS_WINTHREADS, which would solve the above error). How can the release notes claim this works when select_platform_config.hpp doesn't seem to handle Windows CE cases? If BOOST_PLATFORM_CONFIG does indeed need to be boost/config/platform/win32.hpp, then I need to define either _WIN32, __WIN32__, or WIN32. My first reaction is that none of these should be used for compiling for CE. I would welcome any ideas!
 
Note that I would also welcome suggestions on how to compile for Windows CE using STLport with CMake on Windows. Thank you!
 
Kyle
_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Denis Arnaud | 16 Feb 15:25 2011

Re: find_package and Boost.Cmake

>From one of my colleagues...

---------- Forwarded message ----------
From: Daniel Perez
Date: 2011/2/16
Subject: Re: Fwd: [Boost-cmake] find_package and Boost.Cmake


I've been using an ugly trick for that purpose but I guess there might be a more beautiful way to do so by tweaking PATHS or other CMake variables.

I disable /usr/include when I include Boost headers since it seems that /usr/include always get first in find_package (I insist: there might be a nicer way to tell CMake which paths to use, but I didn't find). I do as follows:

1) Unzip a Boost distribution somewhere in your project's sources and enable it with include_directories(). I put Boost in the root of my sources so that I don't have to enable it with include_directories() since the root of the sources is always included by default in my projects.

2) In your CMakeLists.txt you add:

  find_package( Boost 1.43.0 )
 if(Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
 else()
   set (USE_IN_SOURCE_TREE_BOOST true)
 endif()

so USE_IN_SOURCE_TREE_BOOST is defined in the case Boost is not found in the system. If you always want to use the in-source Boost, define that variable unconditionally. Take into consideration that I'm assuming that if you ship your own Boost version it means that you don't care about the version checks and the include paths checks. To note that this assumption only holds for header-only distributions of Boost.

3) You disable /usr/include for the desired set of headers by clearing STANDARD_INCLUDE_DIR:

#ifdef USE_IN_SOURCE_TREE_BOOST
 #define STANDARD_INCLUDE_DIR
#endif

// BOOST Gregorian
#include <boost/date_time/gregorian/gregorian.hpp>
// BOOST Spirit
#include <boost/spirit/include/qi.hpp>
// BOOST_TYPEOF
#include <boost/typeof/typeof.hpp>
// This is needed to use Fusion & maps
#include <boost/fusion/include/std_pair.hpp>
// Phoenix Bind, << operator for val() and some others,
// construct<> and at_c
#include <boost/spirit/include/phoenix.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_object.hpp>
#include <boost/spirit/home/phoenix/bind/bind_function.hpp>
#include <boost/spirit/include/phoenix_fusion.hpp>

I clear this variable in a .cpp file so it's not dangerous.

I hope it helps. And please, let me know if you find a better way of doing this (by supplying PATHS or the like).

Dani
_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Travis Jensen | 15 Feb 03:53 2011
Picon

find_package and Boost.Cmake

I'm trying to figure out how to ensure my build uses my internal version of boost. My directory structure looks like:


./CMakeLists.txt
./mylib/CMakeLists.txt
./dependencies/boost/...

How do I structure my find_package to use the internal one?  

I've tried this:

set(BOOST_ROOT "${DEPENDENCY_DIR}/boost")
find_package( Boost 
              COMPONENTS 
                  thread-mt system-mt program_options-mt date_time-mt
                  random-mt
              PATHS ${BOOST_ROOT} 
)

But that gives me the following error:

CMake Error at dependencies/boost/tools/build/CMake/BoostConfig.cmake:98 (boost_report_pretty):
  Unknown CMake command "boost_report_pretty".
Call Stack (most recent call first):
  CMakeLists.txt:287 (find_package)

If I don't specify PATHS (even if I specify BOOST_ROOT), it uses the boost I have installed on my system.

I can't find any documentation on how to actually use Boost.Cmake. :) Help greatly appreciated.

tj
--
Travis Jensen

Read the Software Maven <at>  http://softwaremaven.innerbrane.com/
Read my LinkedIn profile <at>  http://www.linkedin.com/in/travisjensen
Read my Twitter mumblings <at>  http://twitter.com/SoftwareMaven
Send me email <at>  travis.jensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

*What kind of guy calls himself the Software Maven???*

_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Brian Davis | 26 Oct 22:28 2010
Picon

[Serialization] BUILD_BOOST_WSERIALIZATION appears to be ignored by Boost.CMake


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="&quot;$(ProjectDir)..\..\..\bin\boost\libs\serialization\build\libboost_wserialization.lib\msvc-7.1\release\threading-multi\link-static&quot;"
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
<at> <at> -39,6 +39,7 <at> <at>
   SHARED_COMPILE_FLAGS -DBOOST_SERIALIZATION_DYN_LINK=1
   )
 
+if( BUILD_BOOST_WSERIALIZATION )
 boost_add_library(wserialization
 
   basic_text_wiprimitive.cpp
<at> <at> -54,3 +55,4 <at> <at>
   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 <at> boost <at> <at> 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 <at> boost <at> <at> 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 <at> boost <at> <at> 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 <at> archive <at> boost <at> <at> QEBAIXZ) referenced in function "protected: void __cdecl boost::archive::basic_xml_iarchive<class boost::archive::naked_xml_wiarchive>::load_end(char const *)" (?load_end <at> ?$basic_xml_iarchive <at> Vnaked_xml_wiarchive <at> archive <at> boost <at> <at> <at> archive <at> boost <at> <at> IEAAXPEBD <at> Z)


_______________________________________________
Boost-cmake mailing list
Boost-cmake@...
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
Bill Hoffman | 7 Oct 15:17 2010

git://gitorious.org/~zeuner/boost/zeuners-boost-cmake.git and windows build

Hi,

I am trying to build 
git://gitorious.org/~zeuner/boost/zeuners-boost-cmake.git, branch 1.44.0.

I am getting some build errors:

1. Error linking boost_thread:

2>   Creating library

C:\Users\hoffman\Work\Projects\boost-cmake\zeuners-boost-cmake-build\lib\Debug\boost_thread-vc90-mt-gd-1_44.lib 
and object 
C:\Users\hoffman\Work\Projects\boost-cmake\zeuners-boost-cmake-build\lib\Debug\boost_thread-vc90-mt-gd-1_44.exp
1>tss_dll.obj : error LNK2019: unresolved external symbol 
_on_process_exit referenced in function _DllMain <at> 12
1>tss_dll.obj : error LNK2019: unresolved external symbol 
_on_thread_exit referenced in function _DllMain <at> 12
1>tss_dll.obj : error LNK2019: unresolved external symbol 
_on_thread_enter referenced in function _DllMain <at> 12

2. Errors about token_functions.hpp using
std::iswspace

6>greg_month.cpp
3>C:\Users\hoffman\Work\Projects\boost-cmake\zeuners-boost-cmake\boost/token_functions.hpp(218) 
: error C2039: 'iswspace' : is not a member of 'std'
3>

C:\Users\hoffman\Work\Projects\boost-cmake\zeuners-boost-cmake\boost/token_functions.hpp(217) 
: while compiling class template member function 'bool 
boost::tokenizer_detail::traits_extension<traits>::isspace(char)'
3>        with

3. some undefined stuff in text_wiarchive:

11>text_wiarchive.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport) protected: __thiscall 
boost::archive::detail::basic_iarchive::~basic_iarchive(void)" 
(__imp_??1basic_iarchive <at> detail <at> archive <at> boost <at>  <at> IAE <at> XZ) referenced in 
function "public: __thiscall 
boost::archive::detail::common_iarchive<class 
boost::archive::naked_text_wiarchive>::~common_iarchive<class 
boost::archive::naked_text_wiarchive>(void)" 
(??1?$common_iarchive <at> Vnaked_text_wiarchive <at> archive <at> boost <at>  <at>  <at> detail <at> archive <at> boost <at>  <at> QAE <at> XZ)
11>xml_wiarchive.obj : error LNK2001: unresolved external s

Are these errors in upstream boost?  Or are the specific to the way 
CMake is building them?   Any thoughts on how to fix them?

Thanks.

-Bill

--

-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman@...
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
John Faith | 23 Aug 20:50 2010
Picon

Cross building 1.41.0 in OpenEmbedded

Hi,
I am trying to cross build 1.41.0 for ARM using OpenEmbedded, but see
a failure when linking date_time:

| CMAKE_AR-NOTFOUND cr ../../../lib/libboost_date_time-mt.a
CMakeFiles/boost_date_time-mt-static.dir/gregorian/greg_month.cpp.o
CMakeFiles/boost_date_time-mt-static.dir/gregorian/greg_weekday.cpp.o
CMakeFiles/boost_date_time-mt-static.dir/gregorian/date_generators.cpp.o
| Error running link command: No such file or directory

Where is a good place to start looking for the failure to find cross
ar?  Is this a boost or generic cmake problem? I'm not seeing anything
obvious in the log files.

Thanks!
John

Gmane