Link error 42 (WinApi)
Rikki Cattermole via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Feb 15 21:39:26 PST 2016
On 16/02/16 6:36 PM, ref2401 wrote:
> import core.sys.windows.windows;
>
> void main(string[] args) {
> // I'm aware it would not work properly.
> int formatIndex = ChoosePixelFormat(null, null);
> }
>
> When I compile the code above I'm getting the following link error:
>
> OPTLINK (R) for Win32 Release 8.00.17
> Copyright (C) Digital Mars 1989-2013 All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> console-app.obj(console-app)
> Error 42: Symbol Undefined _ChoosePixelFormat at 8
>
> OS: Win 8.1 Pro
> DMD: v2.070.0
>
> Maybe I have to install something. Any thoughts?
> Thank you.
Try compiling with 64bit.
If it works, its just the import libs not containing the symbol.
More information about the Digitalmars-d-learn
mailing list