When using MinGW, it's easy to run into a DLL hell, i.e. your program not running because it either doesn't find the required DLLs or finds incompatible versions of them.
This can manifest itself as:
- "The code execution cannot proceed because __.dll was not found."
- "procedure entry point __ could not be located in the dynamic link library __"
- Application not starting without any error message, or crashing at startup.
How do I fix this?
(This is intended as a canonical duplicate on this topic.)