Compiling zlib for 64 bit on windows

Posted by Allan Hollenberg on Stack Overflow See other posts from Stack Overflow or by Allan Hollenberg
Published on 2013-10-17T15:52:20Z Indexed on 2013/10/17 15:54 UTC
Read the original article Hit count: 178

Filed under:
|
|
|
|

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)

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows