On 05.09.2011 21:35, Sönke Ludwig wrote:
Am 05.09.2011 19:54, schrieb Rainer Schuetze:
What OS are you running on?
Your code works for me (XP SP3). Also Visual D works fine AFAICT (its
a plugin DLL to VS).
Windows 7 x64 SP1... But it is more complicated than it seemed.
I had another file linked to the DLL that I thought had not effect.
But actually it used a function from another DLL* that was linked in
statically via passing a .lib file to the command line (along with the
source files). The error does not occur if compiling and linking is
done by separate invocations of dmd. Also commenting out all the lines
that use a function from the external DLL fixes the problem.
(* that DLL is LLVM 2.9, so no D code inside)
There might be issues if you are calling another DLL from inside the
(non-shared) static constructors and that DLL also uses TLS. In
DllMain(DLL_PROCESS_ATTACH), each existing thread is initialized by just
swapping the TLS data of the DLL and then running the module
initialization. So if another DLL is called, it will only see the TLS of
the thread that called DllMain.
I don't think anything in this code has changes recently. Is this a
regression from the last dmd version?
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta