Saturday, May 5, 2012

Statically linking pthreads-w32

Perhaps some of you are wondering why would anyone use POSIX threads under Windows? Simply put, because we can. In case you did not know, yes, there is a port of them for Windows, even pthreads-w64 for MinGW-W64.

Unfortunately, statically linking Pthreads to your app is much trickier than any other library I've encountered.
It requires what is called "Manual Initialization". It looked complicated, and I as a beginner couldn't yet follow those instructions, so I've never really bothered trying to do it.

The Pthreads-W32 port dev team have also provided information on how to do it. Just look at their README and their README on non-portable code(aka static linking).

No comments:

Post a Comment