Building Win32 application via dub

Adam D. Ruppe destructionator at
Tue Apr 28 20:18:29 UTC 2020

On Tuesday, 28 April 2020 at 19:25:06 UTC, Sam E. wrote:
> I'm a bit surprised to see a linking error given that building 
> directly from `dmd` seems to work fine without any flag.

dmd directly uses -m32 whereas dub by default uses -m32mscoff to 

The mscoff linker (also used for -m64 btw) doesn't add the user32 
library by default, you must explicitly add it.

So with dub just add the user32 library to your config file and 
it should be ok. (I don't recall the syntax for that off the top 
of my head)

More information about the Digitalmars-d-learn mailing list