[Issue 19784] DLL in BetterC mode - Symbol Undefined __acrtused_dll
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 3 12:10:18 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19784
--- Comment #4 from AlexKotik <relmail at 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 at 12
lld-link.exe: error: undefined symbol: _MessageBoxA at 16
>>> referenced by dll.obj:(_Test at 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 at 16
>>> referenced by dll.obj:(_Test at 0)
Error: linker exited with status 1
--
More information about the Digitalmars-d-bugs
mailing list