betterC DLL in Windows

Adam D Ruppe destructionator at
Sat Feb 4 18:27:34 UTC 2023

On Saturday, 4 February 2023 at 18:11:05 UTC, Tamas wrote:
> Well, as I'm new to D this isn't something I have insight into.

Then you'd probably be better off taking my word for it (or even 
trusting your own limited experience where things worked until 
you added the switch) and just not using -betterC switch.

It is hopelessly broken, but thankfully, it also brings zero 
benefit, so simply not using it is a viable path forward.

> I mostly need interop with C libraries and D would only serve 
> as a glue, so I don't really need several features like GC etc.

Just don't call those functions and they won't hurt you, aside 
from adding ~200 KB of size to the dll. On the other hand, the 
-betterC switch is hurting you - as evidenced by your own attempt 
working until you added it.

> Perhaps, but this doesn't help me much.

It is a very easy solution to your problem. It is up to you if 
you want to take it and continue on in productivity or keep 
suffering for no benefit (and you'll find more trouble the 
further you go using the broken, barely supported switch).

More information about the Digitalmars-d-learn mailing list