Find the x86 version of libdwmapi.a

  • orwelldevcpp

    orwelldevcpp - 2012-05-06

    I've probably searched through the whole internet for this, but is there any place where I can get the x86 version of libdwmapi.a? MinGW, MinGW64 and any version of TDM-GCC do not include it, or only include only the x64 (amd64) version of it.

    I've also tried using and/or converting the Windows SDK versions (dwmapi.lib), but that wouldn't work either.

  • Kai Tietz

    Kai Tietz - 2012-05-06

    hmm, we seem to miss this library.  Well, you can use gendef tool for generating a .def file by this DLL (for 32-bit).  By it the import-library can be produced.
    If you would provide this .def to us (by sending it as patch to our public mailing-list), we will happily add it to the import-library generation.


  • Ozkan Sezer

    Ozkan Sezer - 2012-05-06

    lib32/dwmapi.def has been included in the trunk and all stable branches since around rev. 4560 (2011-10-29). I suggest updating to a toolchain using a newer version of mingw-w64 crt.

  • orwelldevcpp

    orwelldevcpp - 2012-05-07

    It's quite easy to simply compile one using dwmapi.lib and dwmapi.dll from a Windows 7 x64 install and SDK:

    One might think why I didn't do this anyway (it isn't that hard at all and the Windows SDK is free), but I couldn't find any lib that declares this function (from dwmapi.h):

    HRESULT DwmExtendFrameIntoClientArea(
        HWND hWnd,
        const MARGINS *pMarInset

    Notice the lack of  'WINAPI' after HRESULT. This definiton is wrong according to Microsoft: both dwmapi.lib and the library supplied by the sezero build (probably built using dwmapi.lib) require "WINAPI" to be present. Otherwise, the linker won't have a clue what to call.

    And that's the root cause of all the trouble. Both TDM-GCC and MinGW64 have this wrong header definition, which causes homegrown libraries (and the sezero one) not to work.

    I might be wrong though. Still, any comments on this?

  • Jonathan Yong

    Jonathan Yong - 2012-05-07

    Yes, looks like the headers are missing WINAPI.


Log in to post a comment.