Boost logo

Boost :

Subject: Re: [boost] Fwd: [Thread] Solution to conflict with MFC?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-04-27 11:57:47


Den 27-04-2011 17:13, Anthony Williams skrev:
> Thorsten Ottosen<thorsten.ottosen_at_[hidden]> writes:

> It is more of a hack than a patch: remove the use of _pRawDllMain from
> tss_pe.cpp, and add a new object file outside the boost thread library
> that contains a _pRawDllMain that calls both the MFC and Boost
> initialization functions. The user must explicitly add that object file
> to their project.

Hm. That does sound like a hack. But at least it doesn't require users
to modify boost source code whenever they upgrade boost.

Is there any possibility that the initialization of this pointer
in tss_pe.cpp can be made dynamic based on some parameter
passed to the code? It would be really cool if we could just say

#define BOOST_THREAD_DISABLED_DLL_CALLBACK 1
#include <boost/thread.hpp>

in the code that needs it. AFAICR, we can have global data in headers
as long as it is inside some template.

-Thorsten


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