JZIP in Mingw

Would anyone mind helping me build jzip using mingw/msys?
Dispite the fact that I have installed the zlib-dev package, gcc reports that it cannot find zlib.h.

I have a modified jzip with a windows console interface in https://github.com/borg323/jzip. You can build this with mingw using the attached Makefile. This Makefile isn’t fully tested, but building works for me.

Makefile.zip (1.4 KB)

I get the following error:
winio.c: In function ‘check_font_char’:
winio.c:1153:4: error: unknown type name ‘CONSOLE_FONT_INFOEX’; did you mean ‘CO
winio.c:1157:8: error: request for member ‘cbSize’ in something not a structure
or union
font.cbSize = sizeof(CONSOLE_FONT_INFOEX);
winio.c:1157:25: error: ‘CONSOLE_FONT_INFOEX’ undeclared (first use in this func
tion); did you mean ‘CONSOLE_CURSOR_INFO’?
font.cbSize = sizeof(CONSOLE_FONT_INFOEX);
winio.c:1157:25: note: each undeclared identifier is reported only once for each
function it appears in
winio.c:1158:4: warning: implicit declaration of function ‘GetCurrentConsoleFont
Ex’; did you mean ‘GetCurrentPositionEx’? [-Wimplicit-function-declaration]
GetCurrentConsoleFontEx(GetStdHandle (STD_OUTPUT_HANDLE), 0, &font);
winio.c:1161:22: error: request for member ‘dwFontSize’ in something not a struc
ture or union
lf.lfHeight = font.dwFontSize.Y;
winio.c:1162:30: error: request for member ‘FaceName’ in something not a structu
re or union
wcscpy(lf.lfFaceName, font.FaceName);

This is defined in the (current) mingw headers, but for windows versions from vista onwards. Are you building on xp or earlier?

I’m building in Windows 7.

Thanks for the bug report. I’m working on a patch, but in the meantime, can you check whether adding a #define _WIN32_WINNT 0x0600 to the top of winio.c (before including windows.h) helps? If not you can replace the full code of check_font_char() at the end of winio.c with a simple return 1; which should work.

I updated the repository with the offending code compiled only if _WIN32_WINNT >= 0x0600, which is not the case for mingw as far as I can see. This will make @check_unicode more optimistic, replying that every character is available, similar to what is suggested in The Z-Machine and @check_unicode.

If you are only looking for binaries, there are automatic appveyor builds for every commit to my tree, the latest is here.