Boost logo

Boost Users :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-03-07 01:51:48


Adam H. Pendleton wrote:
> On Mar 6, 2004, at 11:03 PM, Aleksey Gurtovoy wrote:
>
> >
> > It won't link only if BOOST_NO_EXCEPTIONS is defined, and it _might be_
> > getting defined implicitly somewhere in config headers (e.g. line 47 in
> > "boost/config/compiler/gcc.hpp"). I'd check if that's the case:
> >
> > #include <boost/config.hpp>
> >
> > #if defined(BOOST_NO_EXCEPTIONS)
> > # error here!
> > #endif
> >
>
> Needless to say, this code caused the #error to fire.

Here's the part of our gcc config which causes it:

#ifndef __EXCEPTIONS
# define BOOST_NO_EXCEPTIONS
#endif

__EXCEPTIONS is a built-in gcc macro that is defined by default
unless you disable exceptions with "-fno-exceptions".

> What's the solution now?

Check your command line for "-fno-exceptions".

> I tried to #undef BOOST_NO_EXCEPTIONS but that's didn't
> seem to do anything. Do I need to re-build the libraries?

Not until the test above starts passing (unless you are fine with
exceptions support being disabled; in fact, you don't need to rebuild
in that case either -- just provide a definition for
'boost::throw_exception' somewhere in your code).

--
Aleksey Gurtovoy
MetaCommunications Engineering

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net