Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Solution to conflict with MFC?
From: Daniel Bradburn (moagstar_at_[hidden])
Date: 2011-04-27 02:18:27


If you are linking boost thread statically, are you also linking MFC and the
C runtime statically?

2011/4/26 Christian Larsen <contact_at_[hidden]>

> Hello,
>
> I know this has been asked before, but I could not find a good solution.
> I'm experiencing problems with an application using both MFC and
> Boost.Thread. Specifically the assertion
>
> ASSERT(AfxGetModuleState() != AfxGetAppModuleState());
>
> in AfxCoreInitModule() fails. I link Boost.Thread statically into a DLL in
> my project.
>
> From previous posts to this list and elsewhere, e.g.
> http://lists.boost.org/boost-users/2009/04/46929.php, I see that the issue
> is caused by setting _pRawDllMain in tss_pe.cpp. Commenting this line does
> "solve" the problem, but I would rather not have to hack the Boost source
> code this way.
>
> It seems there is a patch somewhere for this problem (referred to in
> http://lists.boost.org/boost-users/2009/04/47015.php), but it appears it
> never made it into the source. Is there any chance of this issue being
> solved in a better way?
>
> Best regards,
> Christian Larsen
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net