title: C can't compile - symbol(s) not found for architecture x86_64
body: <p>Having a serious problem with my C code, I just don't seem to be able to get it to compile and I really can't figure out why. </p>
  
  <p>I have tried researching online and can't find a solution to the problem, do you have any idea?</p>
  
  <p>Thanks for your time!</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "_Insert", referenced from:
        _InsertNode in part1.o
       (maybe you meant: _InsertNode)
    "_Create", referenced from:
        _findShortestPaths in part1.o
    "_DeleteMin", referenced from:
        _findShortestPaths in part1.o
    "_decreaseKey", referenced from:
        _findShortestPaths in part1.o
    "_GetMin", referenced from:
        _findShortestPaths in part1.o
  ld: symbol(s) not found for architecture x86_64
  collect2: ld returned 1 exit status
  make: *** [part1] Error 1
  </code></pre>
  
  <p>Snippits from part1.c</p>
  
  <pre><code>#include "limits.h"
  #include "pegBinaryHeap.h"
  
  void InsertNode(int distance, Node* node, PriorityQueue PQ) {
    ...
    Insert(*item, PQ);
  }
  
  ...
  
  int* findShortestPaths(Graph *graph, int start) {
    ...
  
    //Priority queue ordered by distance
    PriorityQueue pq = Create(graph-&gt;MaxSize);
    for(int i = 0; i &lt; graph-&gt;MaxSize; i++) {
      ...
    }
  
    //While the queue isn't empty:
    while((currentPqItem=GetMin(pq)) != NULL) { 
      ...
      DeleteMin(pq);
  
        //for each node accesable from currentNode
      List *currentNeighbour = currentNode.outlist;
  
      while(currentNeighbour!=NULL) {
        ...
          decreaseKey(currentNode.id, newDistance, pq);
      } // end for
    }// end while
  }
  
  int main(int argc,char *argv[])
  {
    Graph mygraph;
    return 0;
  }
  </code></pre>
  
  <p>And the .h file that it appears to be complaining about</p>
  
  <pre><code>#include "graph.h"
  
  struct HeapStruct;
  typedef struct HeapStruct *PriorityQueue;
  
  typedef struct {
    int distance;
    Node *node;
  } QueueType;
  
  PriorityQueue Create( int MaxSize );
  void Destroy( PriorityQueue H );
  int Insert( QueueType Item, PriorityQueue H );
  QueueType DeleteMin( PriorityQueue H );
  QueueType* GetMin( PriorityQueue H );
  void decreaseKey(int nodeId, int value, PriorityQueue H);
  </code></pre>