Boost expects the project either to be built with macro BOOST_NO_EXCEPTIONS
undefined, or to define the function boost::throw_exception
itself.
From <boost/throw_exception.hpp>
in version 1.34.1:
namespace boost
{
#ifdef BOOST_NO_EXCEPTIONS
void throw_exception(std::exception const & e); // user defined
#else
//[Not user defined --Dynguss]
template<class E> inline void throw_exception(E const & e)
{
throw e;
}
#endif
} // namespace boost
Boost's configuration headers will determine whether to define the macro or not. It looks like it boils down to the compiler you're using, but there may be other factors. Take a look in the boost/config/compiler/
folder for the header file that corresponds to your compiler, then search for BOOST_NO_EXCEPTIONS
in it. There should be some conditions around the #define
to help explain when Boost defines it. You may be able to configure your build to avoid the definition and get past the linker error you're experiencing.
If you're unable to change your compiler config to avoid the definition, then you're probably left defining boost::throw_exception(std::exception const & e)
yourself somewhere in the OpenOffice code. I'm unfamiliar with that code, though, so I can't give a good suggestion where it should go.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…