title: undefined reference to `typeinfo for class'
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/307352/g-undefined-reference-to-typeinfo">g++ undefined reference to typeinfo</a><br>
    <a href="https://stackoverflow.com/questions/1693634/undefined-symbols-vtable-for-and-typeinfo-for">Undefined symbols &ldquo;vtable for &hellip;&rdquo; and &ldquo;typeinfo for&hellip;&rdquo;?</a>  </p>
  </blockquote>
  
  
  
  <p>I can't use my class.</p>
  
  <pre><code>class Accel {
  public:
      virtual void initialize(void);
      virtual void measure(void);
      virtual void calibrate(void);
      virtual const int getFlightData(byte);
  };
  class Accel_ad : public Accel {
  public:
      Accel_ad() : Accel(){}
      void initialize(void) {/*code code code...*/}
      void measure(void) {/*measure code*/}
      const int getFlightData(byte axis){/*getting data*/}
      void calibrate(void) {
          int findZero[FINDZERO];
          int dataAddress;
          uint8_t  data[2];
          for (byte calAxis = XAXIS; calAxis &lt; ZAXIS; calAxis++) {
              if (calAxis == YAXIS) dataAddress = 0x32;
              if (calAxis == XAXIS) dataAddress = 0x34;
              if (calAxis == ZAXIS) dataAddress = 0x36;
              for (byte i=0; i&lt;FINDZERO; i++) {
                  readReverseWordI2C(dataAddress,data);
                  findZero[i] = (data[1] &lt;&lt; 8) | (data[0]);;
                  Delay_ms(10);
              }
              accelZero[calAxis] = findMedian(findZero, FINDZERO);
          }
  
          // replace with estimated Z axis 0g value
          accelZero[ZAXIS] = (accelZero[XAXIS] + accelZero[PITCH]) / 2;
          // store accel value that represents 1g
          measure();
          accelOneG = -accelData[ZAXIS];
      }
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>Accel_ad accel;//all ok
  accel.initialize();//all ok
  accel.calibrate();//ERROR: undefined reference to `typeinfo for Accel'
  accel.measure();//All okey
  </code></pre>
  
  <p>Who know what's wrong?</p>
  
  <p>The entire error I get is:</p>
  
  <blockquote>
    <p>.\obj\main.o:(.rodata._ZTI8Accel_ad[typeinfo for Accel_ad]+0x8): undefined reference to `typeinfo for Accel' [cc] collect2: ld returned 1 exit status</p>
  </blockquote>