title: Undefined symbols. ld: symbol not found
body: <p>Everything is working except this undefined symbols error:</p>
  
  <pre><code>bash-3.2$ make
  g++ -Wall -g solvePlanningProblem.o Position.o AStarNode.o PRM.o PRMNode.o Worl.o SingleCircleWorld.o Myworld.o RECTANGLE.o CIRCLE.o -o solvePlanningProblem
  
  `Undefined symbols:
    "Obstacle::~Obstacle()", referenced from:
        Myworld::~Myworld()in Myworld.o
        Myworld::~Myworld()in Myworld.o
        Myworld::~Myworld()in Myworld.o
    "RECTANGLE::RECTANGLE()", referenced from:
        Myworld::readObstacles(std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;
  in Myworld.o
    "CIRCLE::CIRCLE()", referenced from:
        Myworld::readObstacles(std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;
  in Myworld.o
    "typeinfo for Obstacle", referenced from:
        typeinfo for RECTANGLEin RECTANGLE.o
        typeinfo for CIRCLEin CIRCLE.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  make: *** [solvePlanningProblem] Error 1`
  </code></pre>
  
  <p>It's such a strange error. Is something wrong with the constructor or destructor?
  Any advice will help.</p>
  
  <p>After adding {} after all constructors and destructors the error has been reduced 
  to:</p>
  
  <pre><code>Undefined symbols:
  
    "vtable for Obstacle", referenced from:
        Obstacle::Obstacle()in Myworld.o
    "typeinfo for Obstacle", referenced from:
        typeinfo for RECTANGLEin RECTANGLE.o
        typeinfo for CIRCLEin CIRCLE.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  </code></pre>