Boost logo

Boost :

From: Andreas Huber (ah2003_at_[hidden])
Date: 2003-05-02 17:07:18


Giovanni Bajo wrote:
> Andreas Huber <ah2003_at_[hidden]> wrote:
>
>> This seems a bit suspicious to me. As Peter has already pointed out:
>> Not being able to compile windows.h does not necessarily mean that
>> there can't be multiple threads.
>
> How do you support threading with MSVC without including windows.h?
> How do you declare the required functions from the Win32 API?
> BOOST_HAS_THREADS means "We can support threading somehow", if I
> recall correctly. If BOOST_DISABLE_WIN32 defined, it means that the
> compiler cannot access the Win32 API, which makes accessing the
> thread API impossible.

Don't use Win32 directly. Use a threading lib instead. The threading lib
itself of course needs to include windows.h and is therefore compiled
without /Za. But that does not mean that the client code cannot use /Za
because all it sees is (for example) thread.h and thread.lib. No windows.h
anywhere.

Andreas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk