|
Boost : |
From: williamkempf_at_[hidden]
Date: 2001-03-18 08:30:23
--- In boost_at_y..., "Craig Henderson" <chenderson_at_i...> wrote:
> I am very interested in the new Boost.Threads library and have
downloaded the zip to experiment. I cannot compile the test
program 'thread_test.cpp' or example 'monitor.cpp' in either MSVC5.0
or gcc 2.95.2 with mingw32.
>
> MSVC5.0 fails with
> threads\boost\xlock.hpp(61) : fatal error C1001: INTERNAL COMPILER
ERROR
> I have turned off the usual Enable Minimal Rebuild and related
options and am compiling with a minimum set of options now.
I've not compiled with VC 5.0 and don't know if this older compiler
can even handle the template based code that exists in the
implementation. I'll see if I can diagnose the problem later, but
I'd strongly recommend VC 6.0.
> The config.hpp does not define BOOST_HAS_THREADS for gcc, so I
tried compiling with gcc -DBOOST_HAS_THREADS but with no joy.
> (As an aside, I am new to gcc and cannot get the error output to go
anywhere other than the console. This console scrolls too fast and I
cannot read the errors !! Any help would be appreciated.)
There are actually two macros needed. BOOST_HAS_THREADS indicates
that thread support exists (much as _MT does for VC++).
BOOST_HAS_WINTHREADS or BOOST_HAS_PTHREADS indicates which underlying
thread support library to use for the Boost.Threads implementation.
I'd recommend modifying the config.hpp that comes with the zip file
for your particular compiler defining both BOOST_HAS_THREADS and one
of the other library specific defines in the section for your
compiler. Before formal submission I'll have others insure
config.hpp is properly modified for each compiler/platform that can
support the Boost.Threads library.
> Can anybody supply a gcc makefile or MSVC project/make file to give
me a starting point please ?
The latest zip file contains VC 6 .dsw and .dsp files. Sorry, but VC
5 isn't really supported and I'm not sure that it ever will be for
this library. I do have mingw and may try and provide a makefile for
this compiler, but my efforts are focused elsewhere right now.
Hopefully I've given you enough info to help you out, though. If
not, feel free to e-mail me directly with questions.
Bill Kempf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk