Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [bronf][mingw] pthreads not linked (was Re: [sandia][intel-linux] pthreads not linked)
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2008-12-13 09:17:17


<frederic.bron <at> alcan.com> writes:
>
>
> boost-testing-bounces <at> lists.boost.org a écrit sur 12/12/2008 18:50:34 :
>
> > Joaquin M Lopez Munoz wrote:
> >
> > > Thank you, everything's working just fine now.
> > > BTW, mingw seems to have the very same problem, as
> > > suggested by, for instance, http://tinyurl.com/5khdwo
> >
> > There, I see
> >
> > -mthreads
> >
> > in the linker options, so it sounds like some mingw issue, not
> > a Boost.Build issue. Anybody has any ideas?
> >
> > - Volodya
>
> I am suprised that the linker asks for pthread functions because I used
> the following user-config.jam which should impose the win32 api (that's
> what I normally use in my programs and it works but I never try to
> build dynamic libraries):
>
> using gcc : mingw_3.4.4 : /usr/bin/g++ : <compilerflags>-mno-cygwin
> <compileflags>-DBOOST_WINDOWS_API <linkflags>-mno-cygwin ;

As far as I've been able to see, BOOST_WINDOWS_API is a
Boost.Filesystem-specific macro. To disable Pthreads at a
general level, I think you have to add

   -DBOOST_HAS_WINTHREADS

to your compileflags section.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost-testing list run by mbergal at meta-comm.com