(cocos2dx4win8) I want to update zlib to 1.2.7

I want to use this function: gzopen_w(), so I have to update zlib to v1.2.7. After replace zlib.lib 、zlib.h and zconf.h,the game had creash. I think something wrong when I build zlib,
what should I do to build zlib in win8 with vs2012 ?