pthread

MinGW cannot find pthread

I’ve been trying to build rust on Windows for a while now, and it keeps failing. The build was failing at first due to this issue, but apparently running make after that should succeed. In my case however, it would fail again, and again, with an error ld.exe: cannot find -lpthread. I searched high and low for someone else with the same error, but most people were having undefined references in pthread since they were linking the library before linking the object file that actually references pthread.