title: Using Library In QTCreator Undefined Reference
body: <p>I am building my own library of functions I use to help me learn C++.
  I am attempting a simple QT application and when I run the app I get an undefined error.
  Not sure what I am doing wrong, and its probably a noob thing.</p>
  
  <p>Library Files</p>
  
  <p>CC_Number.h</p>
  
  <pre><code>#ifndef CC_NUMBER_H
  #define CC_NUMBER_H
  #include &lt;string&gt;
  
  using namespace std;
  
  class CC_Number
  {
  public:
      CC_Number();
      virtual ~CC_Number();
      int randCC(int imin=0, int imax=1);
      int arraySize(int x[]);
      int arraySize(double x[]);
      int arraySize(float x[]);
      int arraySize(string x[]);
      string int_to_str(int i);
  protected:
  private:
  };
  #endif // CC_NUMBER_H
  </code></pre>
  
  <p>CC_Number.cpp</p>
  
  <pre><code>#include "CC_Number.h"
  #include &lt;sstream&gt;
  
  using namespace std;
  
  CC_Number::CC_Number()
  {
  //ctor
  }
  
  CC_Number::~CC_Number()
  {
  //dtor
  }
  
  string CC_Number::int_to_str(int i){
  stringstream ss;
  ss &lt;&lt; i;
  string str = ss.str();
  return str;
  }
  </code></pre>
  
  <p>Code That Calls The Library</p>
  
  <p>Animal_Birthdate.h</p>
  
  <pre><code>#ifndef ANIMAL_BIRTHDATE_H
  #define ANIMAL_BIRTHDATE_H
  #include "/home/mongo/Cpp/CC_Cpp/CC_Number.h"
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  class Animal_Birthdate
  {
  public:
  Animal_Birthdate();
  Animal_Birthdate(int m, int d, int y);
  string getBirthdate();
  private:
  int intMonth;
  int intDay;
  int intYear;
  };
  
  #endif // ANIMAL_BIRTHDATE_H
  </code></pre>
  
  <p>Animal_Birthdate.cpp</p>
  
  <pre><code>#include "animal_birthdate.h"
  #include "/home/mongo/Cpp/CC_Cpp/CC_Number.h"
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  Animal_Birthdate::Animal_Birthdate()
  :intMonth(1), intDay(1), intYear(1)
  {
  
  }
  
  Animal_Birthdate::Animal_Birthdate(int m, int d, int y)
  :intMonth(m), intDay(d), intYear(y)
  {
  
  }
  
  string Animal_Birthdate::getBirthdate()
  {
  CC_Number c;
  string bd = c.int_to_str(intMonth);
  return bd;
  }
  </code></pre>
  
  <p>Errors I am Receiving
  /home/mongo/Cpp/CC_Herd_Manager/animal_birthdate.o:-1: In function `Animal_Birthdate::getBirthdate()':</p>
  
  <p>/home/mongo/Cpp/CC_Herd_Manager/animal_birthdate.cpp:-1: error: undefined reference to `CC_Number::CC_Number()'</p>
  
  <p>/home/mongo/Cpp/CC_Herd_Manager/animal_birthdate.cpp:-1: error: undefined reference to `CC_Number::int_to_str(int)'</p>
  
  <p>Contents of CC_Cpp.pro</p>
  
  <pre><code>#-------------------------------------------------
  #
  # Project created by QtCreator 2013-05-31T10:42:21
  #
  #-------------------------------------------------
  
  QT       -= core gui
  
  TARGET = CC_Cpp
  TEMPLATE = lib
  
  DEFINES += CC_CPP_LIBRARY
  
  SOURCES += \
  CC_Number.cpp \
  CC_File.cpp
  
  HEADERS +=\
      cc_cpp_global.h \
  CC_Number.h \
  CC_File.h
  
  unix:!symbian {
  maemo5 {
      target.path = /opt/usr/lib
  } else {
      target.path = /usr/lib
  }
  INSTALLS += target
  }
  </code></pre>