Boost logo

Boost Users :

From: Alessio Mochi (ale211734_at_[hidden])
Date: 2022-01-12 09:31:21


Hello John,
I tried I get no error.

Il giorno mer 12 gen 2022 alle ore 10:12 John Maddock via Boost-users <
boost-users_at_[hidden]> ha scritto:

> On 12/01/2022 09:04, Alessio Mochi via Boost-users wrote:
> > Hello Gavin,
> > I have not defined BOOST_NO_EXCEPTIONS.
> > I don't know why a small project with qt and boost serialization work
> > and this one no. I tried to add #include <boost/exception/all.hpp>
> > before include the serialization header,
> > I don't know if it's correct but seem to fix the problem
>
> What happens if at the very start of your cpp file you add:
>
> #include <boost/config.hpp>
>
> #ifdef BOOST_NO_EXCEPTIONS
>
> #error "Oooops"
>
> #endf
>
> Does the #error get hit?
>
>
> >
> >
> > Il giorno mer 12 gen 2022 alle ore 00:44 Gavin Lambert via Boost-users
> > <boost-users_at_[hidden]> ha scritto:
> >
> > On 12/01/2022 10:22, Alessio Mochi wrote:
> > > Yes, this is a piece of included hierarchy error is show. Thanks
> > in advance
> > [...]
> > > 1>Note: including file:
> > > E:\boost_1_78_0\boost/serialization/throw_exception.hpp
> > >
> > 1>E:\boost_1_78_0\boost/serialization/throw_exception.hpp(30,14):
> > error
> > > C2039: 'throw_exception': is not a member of 'boost'
> > > 1>E:\boost_1_78_0\boost/serialization/throw_exception.hpp(24):
> > message :
> > > see declaration of 'boost'
> >
> > That error at that site suggests that you are compiling with
> > BOOST_NO_EXCEPTIONS defined, which in turn means that you need to
> > define
> > boost::throw_exception yourself before including any boost headers to
> > define what you want to happen when an exception is "thrown" anyway.
> > (Typically a call to abort(), possibly among other things.)
> >
> > Otherwise, you should remove BOOST_NO_EXCEPTIONS and allow it to
> > throw
> > normally.
> >
> > If you're not defining this explicitly in your preprocessor options,
> > check if you have disabled exceptions in your compiler options.
> >
> >
> > I'm not really familiar with Qt but google suggests that some older
> > versions of it disable exceptions by default, but that newer versions
> > might not. Perhaps you need to upgrade.
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > https://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
> --
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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