OpenSSL compiles failed on x86 thought was successful for x86_64

I'm trying to compile my project for x86 and x86_64 architectures on Windows. Using 64bit GCC from mingwbuilds project (4.8.1 rev 5), OpenSSL 1.0.1e compiles and links successfully, but using 32bit