The export with dumpbin works with User32.Lib as well as libuser32.a.
The function MessageBox is included in both, but in the VS version in the User32.Lib with underscore and with gcc in libuser32.a without underscore. In addition, the functions in the MS lib are also decorated.
"C:\...\VC\bin\dumpbin.exe" /EXPORTS "C:\...\x86\User32.Lib" >user32.lib.exports.txt
"C:\...\VC\bin\dumpbin.exe" /EXPORTS "C:\...\TDM-GCC-64\x86_64-w64-mingw32\lib\libuser32.a"
Dump of file C:\...\x86\User32.Lib
File Type: LIBRARY
Exports
ordinal name
_ActivateKeyboardLayout@8
_AddClipboardFormatListener@4
_AdjustWindowRect@12
_AdjustWindowRectEx@16
_AdjustWindowRectExForDpi@20
...
_MessageBoxA@16
_MessageBoxExA@20
_MessageBoxExW@20
_MessageBoxIndirectA@4
_MessageBoxIndirectW@4
_MessageBoxTimeoutA@24
_MessageBoxTimeoutW@24
_MessageBoxW@16
...
Dump of file C:\...\TDM-GCC-64\x86_64-w64-mingw32\lib\libuser32.a
File Type: LIBRARY
Exports
ordinal name
wvsprintfW
wvsprintfA
wsprintfW
wsprintfA
....
MessageBoxW
MessageBoxTimeoutW
MessageBoxTimeoutA
MessageBoxIndirectW
MessageBoxIndirectA
MessageBoxExW
MessageBoxExA
MessageBoxA
...