title: storage size of ‘names’ isn’t known
body: <p>I get this error while compiling this .c source file</p>
  
  <blockquote>
    <p>/INIT_SOURCE_BUILD/src/names_list.c:7:
    error: storage size of ‘names’ isn’t
    known</p>
  </blockquote>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "list.h"
  
  int main(){
  
      struct  List names;
      names-&gt;size = 3;
  
      struct ListElmt michael;
      struct ListElmt john;
      struct ListElmt adams;
  
      names-&gt;head = michael;
  
      michael-&gt;data = 12;
      michael-&gt;next = john;
      john-&gt;data = 14;
      john-&gt;next = adams;
      adams-&gt;data = 16;
  
      struct ListElmt pointer = List-&gt;head;
      for(int x = 0; x &lt; 3 ; x++){
          printf("Iteration.%d data: %d", x, pointer-&gt;data);
          pointer-&gt;next = pointer-&gt;next-&gt;next;
      }
  }
  </code></pre>
  
  <p>and here is header of this linked list</p>
  
  <pre><code>#ifndef LIST_H
  #define LIST_H
  
  #include &lt;stdio.h&gt;
  
  /*                                      Define linked list elements*/
  
  typedef struct _ListElmt{
  
  void                *data;
  struct _ListElmt        *next;
  
  } ListElmt;
  
  /*                                      Define a structure for the list*/
  
  typedef struct _List{
  
  int                 size;
  int                 (*match)(const void *key1, const void *key2);
  void                (*destroy)(void *data);
  
  ListElmt             *head;
  ListElmt             *tail;
  
  } List;
  
  void list_init(List *list, void (*destroy)(void *data));
  
  void list_destroy(List *list);
  
  int list_ins_next(List *list, ListElmt *element, const void *data);
  
  int list_rem_next(List *list, ListElmt *element, void **data);
  
  int list_size(const List *list);
  
  ListElmt *list_head(const List *list);
  
  ListElmt *list_tail(const List *list);
  
  int list_is_head(const ListElmt *element);
  
  int list_is_tail(const ListElmt *element);
  
  void *list_data(const ListElmt *element);
  
  ListElmt *list_next(const ListElmt *element);
  #endif
  </code></pre>