title: Error while compiling C program with gcc in VSCode
body: <p>I wanted to compile the below code in VS Code, but I'm fetching this error using "code runner". I've looked up everywhere, but it didn't solve my issue.</p>
  
  <p>I want to implement this <code>T(n) = 2T(n/2) + nlog(n)</code></p>
  
  <p>q2.c</p>
  
  <pre><code>// b. T(n) = 2T(n/2) + nlog(n)
  
  #include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  int func(double n)
  {
      return (2*func(n/2) + n*(log(n)));
  
  }
  
  int main()
  {
      double n, result;
      printf("Enter the value of 'n' \n");
      scanf("%lf",&amp;n);
      printf("Hey");
      result = func(n);
      printf("%lf \n",result);
      printf("Hey");
  
      return 0;
  
  }
  </code></pre>
  
  <p>Console:</p>
  
  <pre class="lang-none prettyprint-override"><code>user@user-H310M-DS2:~/Desktop/C programming/Assignments$ cd "/home/user/Desktop/C programming/Assignments/" &amp;&amp; gcc q2.c -o q2 &amp;&amp; "/home/user/Desktop/C programming/Assignments/"q2
  /tmp/ccnNXN3L.o: In function `func':
  q2.c:(.text+0x3a): undefined reference to `log'
  collect2: error: ld returned 1 exit status
  </code></pre>