Code like the following does not compile: version(Windows) { import core.sys.windows.dll : SimpleDllMain; mixin SimpleDllMain; } Because SimpleDllMain depends on dll_process_attach, dll_process_detach, dll_thread_attach and dll_thread_detach from core.sys.windows.dll. Statically importing the module, or using a renamed import, would also break the mixin. It would probably be a robust fix to add: import core.sys.windows.dll : dll_process_attach, dll_process_detach, dll_thread_attach, dll_thread_detach; To the body of the DllMain function inside the mixin.
https://github.com/D-Programming-Language/druntime/pull/1385
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/957d83f1c342e44229d148027a449c956a42c122 fix Issue 15036 - SimpleDllMain assumes various symbols are available unqualified https://github.com/D-Programming-Language/druntime/commit/15cde5050c8341fec3c8b5f5ad83eac2a92fe6f3 Merge pull request #1385 from CyberShadow/pull-20150912-184323 fix Issue 15036 - SimpleDllMain assumes various symbols are available…
Commits pushed to stable at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/957d83f1c342e44229d148027a449c956a42c122 fix Issue 15036 - SimpleDllMain assumes various symbols are available unqualified https://github.com/D-Programming-Language/druntime/commit/15cde5050c8341fec3c8b5f5ad83eac2a92fe6f3 Merge pull request #1385 from CyberShadow/pull-20150912-184323