dmd + optlink Symbol Undefined _StretchDIBits at 52

Dennis dkorpel at gmail.com
Fri May 3 08:39:33 UTC 2019


On Friday, 3 May 2019 at 06:20:37 UTC, Mike Parker wrote:
> If you compile with -m32mscoff for 32-bit or -m64, DMD will use 
> the Microsoft linker and import libraries if you have Visual 
> Studio or the MS Build tools installed, and the LDC linker with 
> some import libraries from MinGW if you don’t.

I don't know if it's specific to me, but with dmd and mscoff I 
found the need to explicitly mention that I wanted to use the 
import libraries.

E.g. looking at the requirements section of the docs:
(https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-stretchdibits)

I would put this in my code:
pragma(lib, "Gdi32.lib");


More information about the Digitalmars-d-learn mailing list