Link error 42 (WinApi)

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 15 22:22:33 PST 2016


On 16/02/16 7:13 PM, ref2401 wrote:
> On Tuesday, 16 February 2016 at 05:39:26 UTC, Rikki Cattermole wrote:
>> Try compiling with 64bit.
>> If it works, its just the import libs not containing the symbol.
>
> dmd main.d -ofconsole-app.exe -debug -unittest -wi -m64
>
> That's what I'm getting now:
>
> console-app.obj : error LNK2019: unresolved external symbol
> ChoosePixelFormat referenced in function _Dmain
> console-app.exe : fatal error LNK1120: 1 unresolved externals

Found the problem, you haven't linked against gdi.


More information about the Digitalmars-d-learn mailing list