title: Getting "undefined reference" in QT Creator when calling defined function
body: <p>So, I'm reading this book: C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield, in order to learn GUI programming. And while following thew book's steps to create a simple spreadsheet application I get an "undefined reference"
   error when I try to compile the Spreadsheet widget.</p>
  
  <p>All the errors seem to be originated from the <code>Cell *Spreadsheet::cell(int row, int column)</code> function:</p>
  
  <pre><code>Cell *Spreadsheet::cell(int row, int column) const
  {
      return static_cast&lt;Cell *&gt;(item(row, column));
  }
  </code></pre>
  
  <p>This is the first function that complains from spreadsheet.cpp</p>
  
  <pre><code>QString Spreadsheet::formula(int row, int column) const {
      Cell *c = cell(row, column);
      if (c) {
          return c-&gt;formula();
      } else {
          return "";
      }
  }
  </code></pre>
  
  <p>Where the line <code>Cell *c = cell(row, column);</code> Sends the error: /home/axel/QtSDK/Code/Spreadsheet/spreadsheet.cpp:-1: error: undefined reference to `Cell::Cell()'</p>
  
  <p>This keeps happening everywhere that <code>cell(row, column)</code> is called. The function in itself is defined in the spreadhseet header in the private section as: <code>Cell *cell(int row, int column) const;</code></p>
  
  <p>Sorry if it seems messy I'm kinda new to C++ programming.</p>
  
  <p>Here's my .pro file</p>
  
  <pre><code>TEMPLATE = app
  CONFIG += console
  CONFIG += qt
  
  SOURCES += main.cpp \
             spreadsheet.cpp
  
  HEADERS += \
             spreadsheet.h
  </code></pre>
  
  <p>If I'm missing something I'll add it as soon as I can.</p>
  
  <p>Thanks,
  Axel</p>