|
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: Rudi Lindl (rudi.lindl_at_[hidden])
Date: 2008-09-04 07:53:59
it was a nice aha experience for me as well.
I found another solution to solve my problem. The only reason why i am using
managed c++ code is that i call a .net(another dll) code within my dll.
There is a solution to call this code without managed c++ code. And then the
first thing i will do is to get rid of the nasty /clr compiler switch ;)
2008/9/4 Anthony Williams <anthony_at_[hidden]>
> 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
>
>
> _______________________________________________
> threads-devel mailing list
> threads-devel_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/threads-devel
>