title: GCC undefined reference to thrd_create() in C11 mode after #include <threads.h> in Debian
body: <p>I'm trying to compile a program that I've been able to compile on several other Debian environments with no issues using the C11 <code>&lt;threads.h&gt;</code> library on a relatively fresh install of Debian Bullseye with &quot;<code>gcc (Debian 10.2.1-6) 10.2.1 20210110</code>&quot; installed</p>
  <p>with the command</p>
  <p><code>gcc -o &lt;progname&gt; -O3 -Wall -Wextra -std=c11 -lpthread &lt;sourcefile&gt;</code></p>
  <p>and I'm getting a string of linker errors in the form of
  <code>undefined reference to 'mtx_unlock'</code>
  as well as <code>mtx_lock</code> <code>mtx_init</code> <code>thrd_create</code> etc.</p>
  <p>But I'm not getting an error saying the <code>threads.h</code> file is absent. I tried removing the <code>-lpthread</code> argument from the compilation command but this changed nothing.</p>
  <p>What is going wrong?</p>