title: malloc undefined
body: <p>I am currently working on rewriting a linked list module and I am receiving some weird errors.</p>
  
  <p>In two IDEs (Netbeans &amp; Visual Studio Express), I am getting a warning that <em>malloc</em> is undefined and that a function found in my linkedlist.c file is not defined either.</p>
  
  <p>below are my 3 files.</p>
  
  <p>main.c  </p>
  
  <pre><code>#include &lt;stdlib.h&gt;  
  #include &lt;stdio.h&gt;  
  #include "linkedlist.h"  
  int main(void){  
   struct linked_list * l_list;   
   l_list = new_list();  
   printf("%i", l_list-&gt;length);  
   getchar();  
   return (EXIT_SUCCESS);  
  }
  </code></pre>
  
  <p>linkedlist.h  </p>
  
  <pre><code>#ifndef LINKEDLIST_H  
  #define LINKEDLIST_H  
  struct linked_list{  
   int length;  
   struct linked_list_node * head_node_ptr;  
  };  
  struct linked_list_node{  
   struct linked_list_node * prev_node_ptr;  
   struct linked_list_node * next_node_ptr;  
   struct linked_list_data * head_data_ptr;  
  };  
  struct linked_list_data{  
   struct linked_list_data * prev_data_ptr;  
   struct linked_list_data * next_data_ptr;  
   void * data;  
  };  
  struct linked_list * new_list();  
  #endif  
  </code></pre>
  
  <p>linkedlist.c  </p>
  
  <pre><code>#include "linkedlist.h"  
  struct linked_list * new_list(){  
   struct linked_list * temp_list = malloc(sizeof(struct linked_list));  
   temp_list-&gt;length = 5;  
   return temp_list;  
  }  
  </code></pre>
  
  <p>Any help would be greatly appreciated. I am unsure if this is a syntax issue or missing files on my computer.</p>