On Sunday, 30 September 2018 at 14:06:20 UTC, Vinod K Chandran
wrote:
Thanks. It worked.
I would like to compile this as a gui. Now it starts with the
cmd. Google search didn't gave me the link i want. Any help ?
With the default OPTLINK linker:
dmd -L/SUBSYSTEM:windows app.d
In this case, user32.lib where MessageBoxW and MessageBoxA reside
is automatically linked.
When using the MS linker:
dmd -m64 -L/SUBSYSTEM:windows -L/ENTRY:mainCRTStartup app.d
user32.lib
In this case, user32.lib is not automatically linked. Replace
-m64 with -m32mscoff for 32-bit output with the MS linker.
-L passes command line options to the current linker.