Zlib header not found when cross compiling with mingw?

I run ./configure --host=x86_64-w64-mingw32, but for some reason it tells me "zlib header not found.". I have packages installed ( apt-get install zlib1g-gev), but that still tells me that.

When I just run ./configure, it compiles fine.

I am trying to cross-compile a 64-bit Windows executable on Debian 7 using MinGW-64

What should I do to fix this problem or avoid such a thing?

+4
source share
1 answer

Windows software requires Windows libraries, Mingw is looking for a cross-compiled Zlib that you need to create yourself:

  • Download zlib source
  • PREFIX win32/Makefile.gcc. 32- :

PREFIX = i686-w64-mingw32-

  1. configure! ( "i686-w64-mingw32" , /usr ):

BINARY_PATH=/usr/i686-w64-mingw32/bin INCLUDE_PATH=/usr/i686-w64-mingw32/include LIBRARY_PATH=/usr/i686-w64-mingw32/lib make -f win32/Makefile.gcc

BINARY_PATH=/usr/i686-w64-mingw32/bin INCLUDE_PATH=/usr/i686-w64-mingw32/include LIBRARY_PATH=/usr/i686-w64-mingw32/lib make -f win32/Makefile.gcc install

- zlib, Mingw. x64 PREFIX ( ) : x86_64-w64-mingw32 i686-w64-mingw32.

: https://wiki.openttd.org/Cross-compiling_for_Windows#Compiling_zlib

+6

Source: https://habr.com/ru/post/1523447/


All Articles