mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Issue with libboost_thread 1.44 static


From: Lothar May
Subject: Re: [Mingw-cross-env-list] Issue with libboost_thread 1.44 static
Date: Fri, 22 Oct 2010 21:31:56 +0200

Hi,

sorry for the delay. The test program is quite simple:

-- cut here --
#include <boost/thread/thread.hpp>
#include <boost/thread/tss.hpp>

boost::thread_specific_ptr<int> ptr;


void test()
{
    if (ptr.get() == 0)
      ptr.reset(new int(0));

}

int main()
{
  boost::thread thrd(test);
  thrd.join();
  return 0;
}

-- cut here --

Linking to boost_thread, you can see both kinds of errors here: If
compiling without -DBOOST_THREAD_USE_LIB, then there are linker
errors, if you compile with it, then linking fails only without the
patch.

NOTE: This problem has just been fixed upstream:
https://svn.boost.org/trac/boost/changeset/66140
It is probably best to use this patch from this link, as it contains a
little more than proposed in the ticket.

I'm sorry I cannot provide the improved build command in detail, as I
cannot access the Linux system at this time.

Regards,
Lothar

2010/10/20 Volker Grabsch <address@hidden>:
> Hello Lothar,
>
> Lothar May <address@hidden> schrieb:
>> if boost is built as static lib. A patch needs
>> to be applied to libboost_thread, otherwise there will be an error
>> when linking the app. See
>>
>> https://svn.boost.org/trac/boost/ticket/4258
>
> Thanks for the information!
>
> Would you mind providing an improved test program (see src/boost-test.cpp)
> and/or an improved test build command (see last few lines of boost.mk)?
>
> That way we could reproduce the linking error and ensure that it is
> really solved and will never appear again.
>
> Thanks!
>
>
> Greets,
> Volker
>
> --
> Volker Grabsch
> ---<<(())>>---
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]