title: Error Occurring From Pow Function in C
body: <p>I have included the math.h header file. </p>
  
  <p>If I do something like </p>
  
  <pre><code>   float var = pow(2, 3)  
  </code></pre>
  
  <p>it complies and there aren't any errors. But if I try something like</p>
  
  <pre><code>float var2 = 5;
  float var = pow(var2, 2)
  </code></pre>
  
  <p>it doesn't compile and gives me the error</p>
  
  <pre><code>undefined reference to `pow' collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>I am not very familiar with c, but I have no idea why this is happening, as it is fine without using a variable. It's like if I use a variable in the pow function, it gives me this error. I am using Xubuntu and then run the command </p>
  
  <pre><code>"cc -g -std=c99 myfile.c 
  </code></pre>
  
  <p>to compile the program. </p>