Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2226: boost::thread 1.36.0 /clr Link Error LNK2022
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-02 10:43:29
#2226: boost::thread 1.36.0 /clr Link Error LNK2022
-----------------------------------+--------------------------------------
Reporter: benjamin.sternlieb@⦠| Owner: anthonyw
Type: Bugs | Status: closed
Milestone: Boost 1.36.0 | Component: thread
Version: Boost 1.37.0 | Severity: Showstopper
Resolution: wontfix | Keywords: clr dummy thread LNK2022
-----------------------------------+--------------------------------------
Comment (by anonymous):
Replying to [comment:2 roffe@â¦]:
> The linker Error LNK2022 when compiling with /clr can be resolved by
adding
>
> {{{
> namespace boost {
> struct thread::dummy {};
> }
> }}}
>
> after the inclusion of <boost/thread/thread.hpp>
>
> Dynamically linked everything seems to work. However when statically
linked, the application still fails to initialize with error 0xc000007b
(which seems to be a different problem arising of the use of an
undocumented PE hook mechanism).
>
For anyone finding this issue, the above fix worked great for me. The
reason it fixes it is because the compiler is expecting a
boost::thread::dummy() method for whatever reason and cannot find one.
Adding this definition in satisfies the compiler so that it can continue.
Obviously the method does nothing but it doesn't need to.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2226#comment:7> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC