|
Threads-Devel : |
Subject: Re: [Threads-devel] thread_specific_ptr within DLL cause a "is not a valid Win32 application" error during loading of the dll
From: Anthony Williams (anthony_at_[hidden])
Date: 2008-09-04 05:55:31
At Thu 04 Sep 2008 09:58:10 BST, Rudi Lindl <rudi.lindl_at_[hidden]> wrote:
> I think i have found the problem,
>
> the dll i used included the Managed Extensions for C++ projects. This cause
> the problem because Managed Extensions for C++ projects that are created as
> DLLs by default do not link to native C/C++ libraries such as the C run-time
> (CRT) library, ATL, or MFC and do not use any static variables (see
> http://support.microsoft.com/?scid=kb%3Ben-us%3B814472&x=5&y=4). The
> testind DLL i wrote did not uses the managed extensions and therefore had no
> problems.
Aha. A couple of trac tickets have been raised about boost.thread not
working with /clr. You could try separating the usage of boost.thread
into a separate non-managed DLL.
> Maybe you should mention this pitfall in the boost thread documentation.
I guess so.
Anthony
-- 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