good day! Tell me, please, how to compile gzip from the libdeflate project . As the author of the program did.

I use MSYS2 for compilation.

  • Do you want to make gzip based on libdeflate? - Yaroslav
  • Yes, as I understand it, this can be done. so did the author of the project github.com/ebiggers/libdeflate/releases . I made small changes to improve compression, but I don’t understand how to compile. - lorents

1 answer 1

Carefully study the Makefile file there look options BUILD_GZIP_PROGRAM BUILD_PROGRAMS

  • you can fix the file itself, or you can run make BUILD_GZIP_PROGRAM=yes with this option. - Yaroslav
  • Thank you very much! Now gives an error - lorents
  • $ make BUILD_GZIP_PROGRAM = yes gcc -o gzip -O2 -fvisibility = hidden -std = gnu99 -I. -D_ANSI_SOURCE tools / gzip.c libdeflate.a C: / MSYS2 / mingw32 / bin /../lib / gcc / i686-w64-mingw32 / 5.3.0 /../../../../ i686- w64-mingw32 / lib /../ lib / libmingw32.a (lib32_libmingw32_a-crt0_c.o): In function main': C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to WinMain @ 16 'collect2.exe: error: ld returned 1 exit status Makefile: 161: error in executing the recipe for the "gzip" target make: *** [gzip] Error 1 - lorents
  • The error says that instead of main WinMain or wmain is used, In mingw main is usually used. Somewhere there is a redefinition. - Yaroslav
  • Tell me, please, how can this be fixed? - lorents