Boost logo

Boost :

Subject: Re: [boost] boost namespace
From: Igor S (igorsyl_at_[hidden])
Date: 2009-06-23 21:11:57


Artyom,

I tried your script on 1.39 and it worked flawlessly. Thank you!

Igor

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;
> #else
> #include <asio.hpp>
> namespace netio = asio;
> using asio::error_code;
> using asio::system_error;
> #endif
>
>
> 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:
>
> http://lists.boost.org/boost-build/2009/05/21911.php
>
>
> 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.
>
>
> Artyom
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
Igor

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk