Link error xdgmime.c: unresolved external symbol S_ISREG when building with VS2022
win11, glib-2.71.0 (gio), VS2022, x64.
Creating library D:/temp/29/.sw/out/323969/gnome.glib.gio-2.71.0.lib and object D:/temp/29/.sw/out/323969/gnome.glib.gio-2.71.0.exp
xdgmime.c.4b279509.obj : error LNK2019: unresolved external symbol S_ISREG referenced in function _gio_xdg_get_mime_type_for_file
xdgmimecache.c.79af418f.obj : error LNK2001: unresolved external symbol S_ISREG
D:\temp\29\.sw\out\323969\gnome.glib.gio-2.71.0.dll : fatal error LNK1120: 1 unresolved externals
Hi,
S_ISREG is used in several places across glib. But .c files define and define this macro for win32 themselves privately. Grep it.
Obviously, it should be moved into some header and included where needed.
Edited by Philip Withnall