Error in Graphics/gl2png.cpp, Z_DEFAULT_COMPRESSION was not declared
/tmp/gmsh-2.5.0-source/Graphics/gl2png.cpp: In function ‘void create_png(FILE*, PixelBuffer*, int)’: /tmp/gmsh-2.5.0-source/Graphics/gl2png.cpp:60:38: error: ‘Z_DEFAULT_COMPRESSION’ was not declared in this scope make[1]: *** [CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.o] Error 1 make: *** [Graphics/gl2png.cpp.o] Error 2
I solved it by including <zlib.h>
Also, I found it quite frustrating to fix the CMAKE_DL_LIB -> CMAKE_DL_LIBS bug myself and then found it was already solved 12 months ago, but somehow still in the stable release.