This post contains all the problems I (and other users) had while building the library from sources. As there is no tutorial, I decided to create this sort of FAQ post to put all the solutions together. Hope it will help!
Configuration:
OpenCV 3.2.0
MinGW-w64 x86_64-6.1.0-win32-seh-rt_v5-rev0
You are welcome to add more information in the answers, as it is more handy to have everything in one place.