Compiling zlib for 64 bit on windows
- by Allan Hollenberg
I am currently working on a cross-platform game for Mac OSX and Windows and I'm having some issues with the ZLib library on Windows 64 bit.
My game is focussed on a 64 bit architecture and I am unable to get ZLib to work along with it. When I compile ZLib itself (through make all64 at the source directory of ZLib) it shows no issues but when I want to use it I get a error saying
'/usr/local/lib/libz.a(gzread.o):gzread.c:(.text+0x28e): undefined reference to `__errno''
I have included errno.h before I include zlib.h in my project but that doesn't seem to matter.
I am compiling my app through the cygwin64 terminal and using the x86_64-w64-mingw32-g++ command, I am also linking directly against the lib64 version (if I remove that it compiles correctly but crashes on running due to it having a x86 lib)