So I\'m writing a python extension module in C and I\'m trying to compile it for my 64-bit Python build. After bashing my head against MinGW for a while, I did some googling
For my case , changing project properties in Visual studio (building solution for x64 instead of x86) helped , as Python version I was using was 64 bit .
Both the versions shall match.