This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ problem
- To: Klaus-Georg Adams <Klaus-Georg dot Adams at chemie dot uni-karlsruhe dot de>
- Subject: Re: C++ problem
- From: teunis <teunis at computersupportcentre dot com>
- Date: Tue, 24 Nov 1998 10:33:49 -0700 (MST)
- cc: egcs at cygnus dot com
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