Boost logo

Boost Users :

From: Pedro Lamarão (pedro.lamarao_at_[hidden])
Date: 2006-10-27 09:24:16


John Dunn escreveu:
>> I'm out of ideas. :-) There isn't anything actively
>> CLI-hostile in the thread library as far as I know. You could
>> try stepping into the program with the debugger and see what
>> causes the error, but if it's the .NET loader not liking it
>> for some reason, this might not help. You best bet is
>> probably to report the problem to Microsoft somehow, since it
>> seems like a legitimate regression.
>
> Unfortunately the debugger doesn't help - the error isn't caught by the
> debugger as far as I can tell. I know I've seen problems with my code when
> using static objects in non-managed code. I think it might be related to the
> order in which initialization code is run.

Typically, C++/CLI DLLs are compiled with /NOENTRY.
Because of that, global static initialization does not happen.

This article explains why, what, and how:

http://support.microsoft.com/?id=814472

I've suffered much with this in the past.
In my experiente if you try to fool the CLR and actually compile your
DLL withouth /NOENTRY random things may happen from time to time.

--
  Pedro Lamarão

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