Subject: Re: [boost] boost namespace
From: Igor S (igorsyl_at_[hidden])
Date: 2009-06-23 21:11:57
I tried your script on 1.39 and it worked flawlessly. Thank you!
On Tue, Jun 23, 2009 at 5:24 AM, Artyom <> wrote:
> > I need to use two versions of boost in my
> > application. One the libs I link
> > against is statically linked against boost 1.34 and I'd
> > like to use 1.35's
> > asio library.
> First of all Asio comes as stand alone library outside
> of boost namespace. So, you may just use it as is or use
> namespace renaming:
> #ifdef USE_BOOST_ASIO
> #include <boost/asio.hpp>
> namespace netio = boost::asio;
> using boost::system::error_code;
> using boost::system::system_error;
> #include <asio.hpp>
> namespace netio = asio;
> using asio::error_code;
> using asio::system_error;
> And then just relate to netio::... so you would
> keep an ability to upgrade to boost asio in future.
> This is the way I build CppCMS http://cppcms.sourceforge.net/
> conditionally using Boost 1.33.1 and Asio or boost 1.35 and above only.
> > I believe I can make both versions
> > co-exist if I can manage
> > to rename boost 1.35's namespace to something like
> > boost135.
> Take a look on a script I had written once:
> But note! boost 1.35 and 1.34 are not compatible nither
> ABI nor API.
> So you **must** not mix them in same module! This may be very tricky.
> So you can't use boost in interfaces between modules that use different
> versions of boost.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk