title: Getting the error "undefined reference to 'strsep'" with Clang and MinGW
body: <p>Here is the relevant code:</p>
  
  <pre class="lang-c prettyprint-override"><code>#define _GNU_SOURCE
  #define BUFFER_SIZE 1024
  
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  int main(void) {
      while (1) {
          char* buffer;
          size_t size = 32;
          size_t line;
          line = getline(&amp;buffer,&amp;size,stdin);
          printf("%s\n",buffer);
  
          int commandList[line];
          int count = 0;
          while (strsep(buffer," ")) {
              commandList[count] = strsep(buffer," ");
              count++;
          }
      }
  }
  </code></pre>
  
  <p>I am using Code Blocks with minGW and Clang.</p>
  
  <p>I know some of my code does not do what it is supposed to at the moment, but I am pretty sure it should at least compile. I am also getting a warning: "implicit declaration of function 'strsep'".</p>