Pthreads in windows?


I just got a new laptop that came with windows, always used linux prior to this. What do I need to get to be able to compile and run pthreads in c/c++ on my computer?
Just FYI You can use the gcc compiler suite on windows, which I love. As far as installing I have no idea but if you can simply find a pre-compiled version of pthreads, it will contain 3 folders bin, include, and something else I can't remember, and then just find those folders inside C:\Windows\system32 and place the contents into the folders with the same name. Any file with .dll, .a or .lib can go right into system32. In some cases that includes any exe file there might be.

Refer to this:
Isn't pthreads a linux-only thing?

Yes. But there's the more-or-less port, POSIX Threads for Win32, to allow pthreads to be used for cross-platform development. I've not used it a lot, but have encountered it in open source projects which provide a MinGW build for Windows users.

I say more or less as not all POSIX threads features are available in the port. So it has problems with involved Linux-style threading and the like.

As dancks already posted:

POSIX Threads for Win32

Also see:

Pthreads on Microsoft Windows

Last edited on
Topic archived. No new replies allowed.