If I disable XPM by using XPM=no, then it works.
MAKE command: make -f Make_cyg_ming.mak CROSS=yes CROSS_COMPILE=x86_64-w64-mingw32- UNDER_CYGWIN=yes STATIC_STDCPLUS=yes GUI=yes OLE=yes
Platform: Debian bookworm - AMD64
I tried compiling the latest git release of libxpm with a MinGW-ucrt compiler and it compiles without error. I tried to copying the corresponding libraries and headers into the xpm/x64 directory but it gave a different error message:
Instead of this error message:
/opt/mingw-gcc-14.2.1-ucrt/lib/gcc/x86_64-w64-mingw32/14.2.1/../../../../x86_64-w64-mingw32/bin/ld: xpm/x64/lib/libXpm.a(RdFToI.o):RdFToI.c:(.text+0xf2): undefined reference to `__imp___iob_func'
/opt/mingw-gcc-14.2.1-ucrt/lib/gcc/x86_64-w64-mingw32/14.2.1/../../../../x86_64-w64-mingw32/bin/ld: xpm/x64/lib/libXpm.a(RdFToI.o):RdFToI.c:(.text+0x12f): undefined reference to `__imp___iob_func'
collect2: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1171: gvim.exe] Error 1
It gives this error message:
-Lxpm/x64/lib -lXpm -loleaut32 -lwinmm -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic -lgcc_eh -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic -lole32 -luuid
/opt/mingw-gcc-14.2.1-ucrt/lib/gcc/x86_64-w64-mingw32/14.2.1/../../../../x86_64-w64-mingw32/bin/ld: gobjx86-64/xpm_w32.o:xpm_w32.c:(.text$LoadXpmImage+0x4d): undefined reference to `XpmReadFileToImage'
/opt/mingw-gcc-14.2.1-ucrt/lib/gcc/x86_64-w64-mingw32/14.2.1/../../../../x86_64-w64-mingw32/bin/ld: gobjx86-64/xpm_w32.o:xpm_w32.c:(.text$LoadXpmImage+0x8e): undefined reference to `XDestroyImage'
collect2: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1171: gvim.exe] Error 1
I suspect the error stems from the other header file in the xpm/include directory: simx.h which does not exist in the release build of libxpm.