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
#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