https://issues.dlang.org/show_bug.cgi?id=19051

          Issue ID: 19051
           Summary: Undefined functions Set/GetWindowLongPtr in mingw libs
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: chrismohrf...@comcast.net

Linking fails when using SetWindowLongPtr and GetWindowLongPtr from
core.sys.windows.winuser and compiling to 64-bit.

void main()
{
    import std.stdio;
    import core.sys.windows.winuser;

    writeln("SetWindowLongPtr = ", SetWindowLongPtr(null, 0, 0));
    writeln("GetWindowLongPtr = ", GetWindowLongPtr(null, 0));
}

dmd test.d -m64

C:\dmd2\windows\bin\lld-link.exe: warning: test.obj: undefined symbol:
SetWindowLongPtrW
C:\dmd2\windows\bin\lld-link.exe: warning: test.obj: undefined symbol:
GetWindowLongPtrW
error: link failed
Error: linker exited with status 1


Issue appears to be that these functions are not defined in the mingw 64-bit
user32.lib

--

Reply via email to