Here's what I found about "-ldwmapi"
/*
* dwmapi.h
*
* Some dwmapi.dll exported functions such as
* DwmFlush
* DwmAttachMilContent
* DwmDetachMilContent
* are not declared in this header for not being documented by Microsoft
*
*/
#ifndef __WINAPI_DWMAPI_H
#define __WINAPI_DWMAPI_H
#include <wtypes.h>
/* for MARGINS structure declaration. */
#include <uxtheme.h>
/*
* This API is available only on Vista+ versions. It's not guarded by version check
* because that would cause problems with Mozilla code (and MSVC doesn't seem to be
* doing that as well).
*/
#ifdef __cplusplus
extern "C" {
#endif
/* FIXME: move to winuser.h */
/* DWM messages. */
#define WM_DWMCOMPOSITIONCHANGED 0x031E
#define WM_DWMNCRENDERINGCHANGED 0x031F
#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321
/* FIXME end */
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/+/l-preview/x86_64-w64-mingw32/include/dwmapi.h (https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/+/l-preview/x86_64-w64-mingw32/include/dwmapi.h)
--------------------------------------------------------------------------------------------------
https://windows10dll.nirsoft.net/dwmapi_dll.html
Static Linking dwmapi.dll is statically linked to the following files:
msvcrt.dll (https://windows10dll.nirsoft.net/msvcrt_dll.html)
ntdll.dll (https://windows10dll.nirsoft.net/ntdll_dll.html)
api-ms-win-core-libraryloader-l1-2-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-libraryloader-l1-2-0_dll.html)
api-ms-win-core-synch-l1-2-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-synch-l1-2-0_dll.html)
api-ms-win-core-errorhandling-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-errorhandling-l1-1-1_dll.html)
api-ms-win-core-handle-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-handle-l1-1-0_dll.html)
api-ms-win-core-heap-l1-2-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-heap-l1-2-0_dll.html)
api-ms-win-core-registry-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-registry-l1-1-0_dll.html)
api-ms-win-core-processthreads-l1-1-2.dll (https://windows10dll.nirsoft.net/api-ms-win-core-processthreads-l1-1-2_dll.html)
api-ms-win-core-profile-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-profile-l1-1-0_dll.html)
api-ms-win-core-debug-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-debug-l1-1-1_dll.html)
api-ms-win-core-sysinfo-l1-2-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-sysinfo-l1-2-1_dll.html)
api-ms-win-core-kernel32-legacy-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-kernel32-legacy-l1-1-1_dll.html)
USER32.dll (https://windows10dll.nirsoft.net/user32_dll.html)
GDI32.dll (https://windows10dll.nirsoft.net/gdi32_dll.html)
api-ms-win-core-util-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-util-l1-1-0_dll.html)
api-ms-win-core-winrt-error-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-winrt-error-l1-1-1_dll.html)
api-ms-win-core-quirks-l1-1-0.dll (https://windows10dll.nirsoft.net/api-ms-win-core-quirks-l1-1-0_dll.html)
api-ms-win-core-delayload-l1-1-1.dll (https://windows10dll.nirsoft.net/api-ms-win-core-delayload-l1-1-1_dll.html) This means that when dwmapi.dll is loaded, the above files are automatically loaded too. If one of these files is corrupted or missing, dwmapi.dll won't be loaded.