I'm running ./configure --host=x86_64-w64-mingw32
but for some reason it tells me "zlib header not found."
. I have the packages installed(apt-get install zlib1g-gev
) but it still tells me this.
When I just run ./configure
it compiles fine.
I'm trying to cross-compile a 64 bit executable for Windows on Debian 7 with MinGW-64
What must I do to fix this problem or avoid any thing like this?
Windows software requires windows libraries, Mingw is looking for cross-compiled Zlib, which you have to build yourself:
PREFIX = i686-w64-mingw32-
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
At this point you'll have the cross-compiled zlib accessible by Mingw tools. For x64 the PREFIX var (and paths) will contain this: x86_64-w64-mingw32
instead of i686-w64-mingw32
.
The following link was really helpful: https://wiki.openttd.org/Cross-compiling_for_Windows#Compiling_zlib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With