Boost logo

Boost Users :

Subject: Re: [Boost-users] Catching boost::thread_interrupted
From: Dr. Roland Bock (rbock_at_[hidden])
Date: 2008-09-09 04:21:28


Hi,

cool, that works!

Thanks to all of you who showed interest in this thread. It was my first
posting to boost-users and I am very much impressed with the speed and
accuracy of the answers.

As suggested by Peter, I filed the missing visibility support in
boost::thread as a bug.

Thanks again and best regards from Bavaria,

Roland

Othman, Ossama wrote:
> Hi,
>
>>>> Boost does not use __attribute__ ((visibility("default"))), therefore
>>>> typeinfo for exceptions is not exported and you can't catch exceptions
>>>> thrown by boost.
>>> Please forgive me if this is a stupid question:
>>>
>>> Is that a bug or a feature? Wouldn't it be good to be able to catch
>>> exceptions thrown by boost?
>> I'm not sure I understand. Have you built Boost with an
>> additional -fvisibility-hidden parameter? If you didn't, the default
>> visibility should be the appropriately named "default", should it not? What
>> effect would __attribute__ ((visibility("default"))) then have?
>
> Even if boost is compiled with default visibility, Roland's compile is still going to see it has hidden since the class declaration in question (boost::thread_interrupted) hasn't been explicitly exported in the g++ symbol visibility-enabled case.
>
> Roland, you should be able to work around the lack of g++ symbol visibility support in boost::thread by wrapping your boost #include<>s with the appropriate pragmas, e.g:
>
> #pragma GCC visibility push(default)
> #include <boost/...>
> #include <boost/...>
> #pragma GCC visibility pop
>
> It's ugly, but it should get you going until the g++ symbol visibility issues in boost::thread are addressed.
>
> HTH,
> -Ossama
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://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