title: Error: unknown type in C. What can be the reason when all required header files are included?
body: <p>So I cannot figure out the following problem:
  I am getting unknown type for orderPtr which is typedef of struct Order even though I have included the header file that declares this type.
  Here is the code in queue.h:</p>
  
  <pre><code>#ifndef QUEUE_H
  #define QUEUE_H
  
  #include &lt;stdio.h&gt;
  #include "book.h"
  #include "queue_node.h"
  
  /*
   * Queue structure for consumers threads
   */
  typedef struct queue {
      pthread_mutex_t mutex;
      pthread_cond_t notempty;
      struct queue_node *rear;
  } queuePtr;
  
  void queue_enqueue(queuePtr *, orderPtr *);
  
  orderPtr *queue_dequeue(queuePtr *queue);
  
  
  #endif
  </code></pre>
  
  <p>and here this type is declared in book.h:</p>
  
  <pre><code>#ifndef BOOK_H
  #define BOOK_H
  
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;string.h&gt;
  #include &lt;pthread.h&gt;
  #include "uthash.h"
  #include "customer.h"
  #include &lt;errno.h&gt;
  #include &lt;unistd.h&gt;
  #include "queue.h"
  
  typedef struct order {
      char *title;
      double price;
      char *idnum;
      char *category;
  } orderPtr;
  
  void order_destroy(orderPtr *);
  orderPtr * order_create(char *, double, char *, char *);
  
  #endif
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/MzUDH.png" alt="enter image description here"></p>