From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2008-04-14 13:25:51
"Mat Marcus" <mat-lists_at_[hidden]> writes:
> On Mon, Apr 14, 2008 at 1:20 AM, Anthony Williams
> <anthony_w.geo_at_[hidden]> wrote:
>> "Mat Marcus" <mat-lists_at_[hidden]> writes:
>> > It seems that I am unable to build/use boost threads when compiling
>> > with gcc-4.2.0 on windows. I get errors:
>> > libs\thread\src\win32\thread.cpp:147: error: 'heap_delete' is not a
>> > member of 'boost::detail'
>> > and other (see below). Can someone advise me as to how I can get
>> > boost_thread to build under gcc-4.2.0/32-bit XP machine wth boost
>> > 1.35.0.
>> This surprises me: building using your bjam command line with gcc-4.2.1 on
>> 32-bit Windows XP compiles file.
>> Have you got the latest w32api headers on your include path? I use w32api-3.10
>> from www.mingw.org, but earlier versions should work too.
> Thanks for the suggestion. I naively followed it, but things haven't
> improved yet.
> Let me tell you a little bit more about my configuration. I use a
> version of bjam built with mscv, since my primary builds on this
> machine use the MS compiler. But I sometimes need to build with
> gcc-4.x. I usually run bjam from the cygwin shell, though sometimes I
> use cmd. I configured and compiled my own gcc-4.2.0 under cygwin. I
> had not installed the mingw win32 api headers in the past.
OK, stop right there. I naively assumed that you would be using the mingw port
of gcc like I am. The cygwin port of gcc should use the pthread API by
default. You do not need the w32api headers to build boost thread with cygwin
and the pthread API.
I guess the build problems you're having are because the pthread headers are
being chosen, but the build system is choosing the win32 source files.
I don't have cygwin on this machine, so could you try building with
"threadapi=pthread" on the bjam command line?
-- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk