betterC DLL in Windows

Adam D Ruppe destructionator at gmail.com
Sat Feb 4 17:26:17 UTC 2023


On Saturday, 4 February 2023 at 16:45:31 UTC, Tamas wrote:
> and they compile without `-betterC`, but fail with link errors 
> when using the switch.

then don't use the switch lol

-betterC is barely supported and completely useless so better to 
just not use it.

> export extern (C) void main()
> mixin SimpleDllMain;

No need to ever mix two mains together, the DllMain is the 
required one.

> error LNK2019: unresolved external symbol 
> _D4core3sys7windows3dll18dll_process_attachFPvbZb referenced in 
> function DllMain

This is just betterC breaking the code.


More information about the Digitalmars-d-learn mailing list