Using pthread.h on a windows build

后端 未结 3 699
陌清茗
陌清茗 2020-12-19 03:37

I have a codebase that makes extensive use of pthread.h. On a windows visual studio project, this obviously doesn\'t work since pthreads is a unix utility.

I know t

3条回答
  •  我在风中等你
    2020-12-19 04:09

    I would recommend boost as a library that contains a platform-independent thread abstraction. I don't think you'll find any attempt to call the pthread functions themselves to be satisfying. It's also not very hard to map pthread to Win32 for yourself.

提交回复
热议问题