This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ problem


On Tue, 24 Nov 1998, Klaus-Georg Adams wrote:

> 
> teunis wrote:
> > Ellipse2D.o: In function `Ellipse2D::getPathIterator(AffineTransform *)':
> > /root/apps/projects/hive-3D/src/geom/EllipseIterator.hpp:25: undefined
> > reference to `EllipseIterator virtual table'
> 
> G++ intantiates the vtable for a given class while compiling the
> source file in which the first virtual function of that class is
> defined. This message means that you declared the first virtual
> function of your class and forgot to define it.

No actually - all functions are defined.
[clip]
class EllipseIterator : public PathIterator
  {
private:
  double x, y, w, h;
  AffineTransform* affine;
  int index;

public:
  EllipseIterator(const Ellipse2D* e, AffineTransform* at);
  int  currentSegment(float  coords[],int lim) throw (NoSuchElementException);
  int  currentSegment(double coords[],int lim) throw (NoSuchElementException);
  int  getWindingRule();
  bool isDone();
  void next();
  };

Note : all functions above listed as virtual in PathIterator;
only moving the declaration of the constructor to the end allowed it to
compile - this is original (broken) form.

G'day, eh? :)
	- Teunis



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]