For Visual Studio 2017, I've installed through NuGet Packages. That will download some code from https://sourceforge.net/projects/pthreads4w, compile it and install it in your system. If vcpkg is setup correctly on your machine, Visual Studio should use these files automatically. Thanks for contributing an answer to Stack Overflow!How to install pthread using vcpkg?
Type vcpkg.exe install pthread to install pthread. Run vcpkg integrate install to configure Visual Studio to locate all vcpkg header files and binaries on a per-user basis. You can refer to more details from here: Integrate with Visual Studio (Windows).What are POSIX threads in Visual Studio?
Using POSIX threads in Microsoft Visual Studio. Threads can be used to implement parallelism. For UNIX-based systems, a standardized C language threads programming interface has been specified by the IEEE POSIX 1003.1c standard. Implementations that adhere to this standard are referred to as POSIX threads, or Pthreads.Why is pthread_rwlock_T undefined?
A clear and concise description of what the bug is: Intellisense claims that pthread_rwlock_t is undefined. Probably due to the header file having #if defined __USE_UNIX98 || defined __USE_XOPEN2K in front of the of the typedef. It compiles just fine so it's definitely defined.