https://issues.dlang.org/show_bug.cgi?id=19784

--- Comment #4 from AlexKotik <relm...@rambler.ru> ---
(In reply to kinke from comment #3)
> This (linker) error can be gotten rid of with -L=/SUBSYSTEM:CONSOLE.

I think the better thing to do is /DLL, but still I got these errors:
> dmd -of=dll.dll -betterC -L=/DLL -m32mscoff dll.d
lld-link.exe: error: <root>: undefined symbol: __DllMainCRTStartup@12
lld-link.exe: error: undefined symbol: _MessageBoxA@16
>>> referenced by dll.obj:(_Test@0)

Error: linker exited with status 1

If I do /SUBSYSTEM:CONSOLE I get:
> dmd -of=dll.dll -betterC -L=/SUBSYSTEM:CONSOLE -m32mscoff dll.d
lld-link.exe: error: entry point must be defined
Error: linker exited with status 1

If I add /ENTRY:DllMain to that I get:
> dmd -of=dll.dll -betterC -L=/SUBSYSTEM:CONSOLE -L=/ENTRY:DllMain -m32mscoff 
> dll.d
lld-link.exe: error: undefined symbol: _MessageBoxA@16
>>> referenced by dll.obj:(_Test@0)

Error: linker exited with status 1

--

Reply via email to