title: Undefined reference to 'operator delete(void*)'
body: <p>I'm new to C++ programming, but have been working in C and Java for a long time.  I'm trying to do an interface-like hierarchy in some serial protocol I'm working on, and keep getting the error:</p>
  
  <pre><code>Undefined reference to 'operator delete(void*)'
  </code></pre>
  
  <p>The (simplified) code follows below:</p>
  
  <p>PacketWriter.h:</p>
  
  <pre><code>class PacketWriter {
  public:
      virtual ~PacketWriter() {}
      virtual uint8_t nextByte() = 0;
  }
  </code></pre>
  
  <p>StringWriter.h:</p>
  
  <pre><code>class StringWriter : public PacketWriter {
  public:
      StringWriter(const char* message);
      virtual uint8_t nextByte();
  }
  </code></pre>
  
  <p>The constructor and nextByte functions are implemented in StringWriter.cpp, but nothing else.  I need to be able to delete a StringWriter from a pointer to a PacketWriter, and i've been getting various other similar errors if I define a destructor for StringWriter, virtual or not.  I'm sure it's a simple issue that I'm overlooking as a newbie.</p>
  
  <p>Also, I'm writing this for an AVR chip, using avr-g++ on Windows.</p>
  
  <p>Thanks </p>