[D-runtime] Arghhh, DLLs broken on Win32 *again*!

dawg at dawgfoto.de dawg at dawgfoto.de
Wed Mar 21 05:23:24 PDT 2012


Zitat von Walter Bright <walter at digitalmars.com>:

> As we resume our regularly scheduled breakage of DLLs on Win32 with  
> druntime changes.
>
> ..\dmd testmydll -version=DYNAMIC_LOAD
>
> testmydll
> Start Dynamic Link...
> DLL_PROCESS_ATTACH
> static this for mydll
> object.Error: assert(0) or HLT instruction
> _______________________________________________
> D-runtime mailing list
> D-runtime at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/d-runtime

You're apparently not referring to this HTML-unittest
http://dlang.org/dll.html#Dcode. None of it compiles,
but once it is made compiling it works.

Start Dynamic Link...
DLL_PROCESS_ATTACH
static this for mydll
Hello world!
DLL_PROCESS_DETACH
static ~this for mydll

Please post a correct way to setup a Windows dmd-dev toolchain, how to  
run unittest... .

test.d imports mydll.d and needs mydll's ModuleInfo, thus dynamic loading
is not possible. Have you linked the module twice?



More information about the D-runtime mailing list