Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Win32 TLS problem with dynamic libraries
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-10-25 13:22:43


Le 25/10/12 15:07, Сергей Захарченко a écrit :
> Hello,
>
> I need to build a shared plugin library with Boost libraries linked
> statically into it. As many may know, there's a problem with
> having a .tls section in Win32 dynamic libraries which are to be
> loaded via LoadLibrary, but Boost.Thread insists on having one.
> Assuming that I can guarantee that no Boost.Thread functions
> are called from non-Boost.Thread threads, it shouldn't be
> needed. Apart from patching the Boost.Thread sources, or
> the resulting binaries, what's the best way of eliminating it?
>
> I assume that I need to eliminate tss_pe.cpp from linkage,
> but I don't seem to be able to. Adding a
>
> namespace boost { void tss_cleanup_implemented() {} }
>
> to one of the library's sources doesn't help, as it results in a
> multiply defined symbol error (compiler MSVC2008 from
> Express edition).
>
> Any suggestions? Thank you,
>
Hi,

there are some tickets on the Trac system concerning this issue in
Boost.Thread. Unfortunately I have not yet a clear vision of what needs
to be done.
I don't promise you anything, but I would like to have enough time to
fix these issues for next release.

Anthony, do you have an idea? have you the same kind of issues with your
just::thread implementation? if not, why?

Best,
Vicente


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