title: Using math.h sqrt function in C
body: <p>Reading the documentation for math.h, it seems like all I should have to do is include math.h, and use the math functions included, such as sqrt.  The problem is I get the following error when trying to use sqrt in my program.  I tried math.sqrt, but that did not work, either.  Any idea what I am doing wrong?</p>
  
  <pre><code>undefined reference to `sqrt'
  </code></pre>
  
  <p>...</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  int main (int argc, char *argv[])
  {
    int a, b;
  
    a = 1;
    b = 5;
  
    if (a &lt; sqrt (b))
      printf("1 &lt; sqrt(5)");
  
    return 0;
  }
  </code></pre>