Student programmer here. I write C++ code in a Windows text editor and compile it with g++. I've been given code to compile which has #include <pthreads.h>
. When I try to compile it with PowerShell, I get pthread.h: No such file or directory
.
A little research informs me that pthreads is a part of Linux, not Windows, but there's a 3rd party Pthreads for Windows which is well-regarded. But I can't figure out how to install it. It includes some instructions for building it, but that's not what I need.
I tried the instructions in this question. I downloaded the pre-built version of pthreads, put the .dlls in my PATH variable, and created LIB and INCLUDE variables (there weren't any to begin with) and pointed them at the .lib and .h files, respectively. But I get the same error when trying to compile my code.