Reputation: 2901
Switching my C program from pthreads, POSIX , <pthread.h> to the C11 standard <threads.h>.
Im on a MAC from 2019. Below is my error and my gcc -version output.
How do I upgrade to use <threads.h>?
Question's from 7 years ago say that it is not supported, is this still the case and why not support a 'standard'?
Error message:
ruby.c:5:10: fatal error: 'threads.h' file not found #include <threads.h>
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Upvotes: 1
Views: 587