Ok, finally I discovered what was wrong with my project settings:
I installed Cygwin to use it as alternative toolchain and to use the zlib headers required by my project
I included the PATH of the cygwin headers into my .pro file
In some way, the cygwin headers are incompatible with the Qt headers, generating the compilation error.
To solve it:
I just copied the zlib.h/zconf.h files in a new directory, and then I set this new PATH into my .pro file. Now the compilation is clean!