0

Having read the changelog and some mail archives, pthread is supposed to be supported by TinyC Compiler (TCC) since 0.9.26

https://bellard.org/tcc/changelog.html

version 0.9.26:

User interface:
- -pthread option (same as -D_REENTRANT -lpthread) (Henry Kroll III)

I'm using 0.9.27 Windows 64bit

What I don't get is the actual pthread.h include file is nowhere to found as per error in the question title.

and along with error pthread library not found.

  • pthread.h doesn't usually come preinstalled in Windows. You have to link some lib that supports it. How to do this in this TinyC compiler, I have no idea. – Lundin Aug 19 '22 at 09:05
  • @Lundin Not really Windows related as it is included and builds fine with MinGW GCC. I'm aiming for TinyC though as it seem to support it per their changelog. – LazerBlazer Aug 19 '22 at 10:36
  • If I remember correctly, Mingw uses various libs from Cygwin, so it is more POSIX-friendly than other compilers. – Lundin Aug 19 '22 at 12:00
  • To the best of my knowledge MinGW provides its own glibc, with Microsoft's C runtime library underneath. It is indeed very POSIX friendly, because it's glibc. And glibc includes pthreads. I didn't think MinGW included anything Cygwin, though perhaps Msys2 does. – John Bollinger Aug 19 '22 at 15:30
  • Yes, I have no problems using pthread in MinGW GCC as it has headers and libs for it. The issue is about TinyC Compiler as per question title and changelog that mentions to support it. – LazerBlazer Aug 19 '22 at 18:58

0 Answers0