From: Robert Ramey (ramey_at_[hidden])
Date: 2004-12-10 12:11:27


Vladimir Prus wrote:
> Robert Ramey wrote:
>
>> a) how do we insure that that if a program uses several libraries
>> each of which in turn uses the common utf8 module, we don't get
>> multiply defined symbols at
>
> The "common" files will be included into a wrapper file (one for each
> library), with different namespaceses:
>
> namespace boost { namespace program_options {
> #include "../../libs/detail/utf8/utf8_codecvt.cpp"
>

wll this work without a problem? The first lines of utf8_codecvt_facet.cpp
(my copy) contain:

#include <boost/config.hpp>
#ifdef BOOST_NO_STD_WSTREAMBUF
#error "wide char i/o not supported on this platform"
#else
#include <cassert>
#include <cstddef>
#include <boost/utf8_codecvt_facet.hpp>

So the above will expand to something like:

namespace boost { namespace program_options {

// #include "../../libs/detail/utf8/utf8_codecvt.cpp"

#include <boost/config.hpp>
#ifdef BOOST_NO_STD_WSTREAMBUF
#error "wide char i/o not supported on this platform"
#else
#include <cassert>
#include <cstddef>
#include <boost/utf8_codecvt_facet.hpp>

// } // program_options
// } // boost

which would but all the lowerlevel includes in the program options namespace
as well. Idon't see how that can work.

Robet Ramey