B
bp
Hi,
Could someone to tell me what I'm doing wrong? I'm using
gcc version 3.3.4 and
ld version 2.15.90.0.3 20040415
the linker message is:
.../obj/classOpenAreaForm.o(.text+0x211): In function
`TOpenAreaForm::TOpenAreaForm[not-in-charge](TControl*)':
.../src/appforms/classOpenAreaForm.cpp:66: undefined reference to `vtable
for TOpenAreaForm' ../obj/classOpenAreaForm.o(.text+0x367): In function
`TOpenAreaForm::TOpenAreaForm[in-charge](TControl*)':
.../appforms/classOpenAreaForm.cpp:66: undefined reference to `vtable for
TOpenAreaForm' ../obj/classOpenAreaForm.o(.text+0x4ce): In function
`TOpenAreaForm::TOpenAreaForm[not-in-charge](TControl*, int, int, int,
int, char const*)':
.../src/appforms/classOpenAreaForm.cpp:86: undefined reference to `vtable
for TOpenAreaForm' ../obj/classOpenAreaForm.o(.text+0x638): In function
`TOpenAreaForm::TOpenAreaForm[in-charge](TControl*, int, int, int, int,
char const*)':
.../src/appforms/classOpenAreaForm.cpp:86: undefined reference to `vtable
for TOpenAreaForm' collect2: ld returned 1 exit status
the headers of the involved classes:
TControl.h
______________
#ifndef __CONTROL_HPP_
#define __CONTROL_HPP_
class TControl
{
protected:
TControl *parent;
.....
public:
TControl(TControl *parent_);
TControl(TControl *parent_, int left_,int top_,
int width_,int height_,const char* caption_='\0');
virtual ~TControl(void);
....
};
#endif
--------------------
TForm.h
_________________
#include "classControl.hpp"
class TForm : public TControl {
protected:
virtual void Draw(void);
public:
TForm(TControl *parent_);
TForm(TControl *parent_, int left_, int top_, int width_,
int height_, const char* caption_);
.......
};
....
#endif
--------------------
TOpenAreaForm.h
_________________
#ifndef __OPENAREAFORM_HPP_
#define __OPENAREAFORM_HPP_
#include "../appgui/classForm.hpp"
// forward declaration
class TListView;
class TOpenAreaForm : public TForm {
public:
TOpenAreaForm(TControl *parent_);
TOpenAreaForm(TControl *parent_, int left_, int top_,
int width_, int height_, const char* caption_);
~TOpenAreaForm(void);
TListView* filelist;
void RefreshListItems(void);
};
....
#endif
Could someone to tell me what I'm doing wrong? I'm using
gcc version 3.3.4 and
ld version 2.15.90.0.3 20040415
the linker message is:
.../obj/classOpenAreaForm.o(.text+0x211): In function
`TOpenAreaForm::TOpenAreaForm[not-in-charge](TControl*)':
.../src/appforms/classOpenAreaForm.cpp:66: undefined reference to `vtable
for TOpenAreaForm' ../obj/classOpenAreaForm.o(.text+0x367): In function
`TOpenAreaForm::TOpenAreaForm[in-charge](TControl*)':
.../appforms/classOpenAreaForm.cpp:66: undefined reference to `vtable for
TOpenAreaForm' ../obj/classOpenAreaForm.o(.text+0x4ce): In function
`TOpenAreaForm::TOpenAreaForm[not-in-charge](TControl*, int, int, int,
int, char const*)':
.../src/appforms/classOpenAreaForm.cpp:86: undefined reference to `vtable
for TOpenAreaForm' ../obj/classOpenAreaForm.o(.text+0x638): In function
`TOpenAreaForm::TOpenAreaForm[in-charge](TControl*, int, int, int, int,
char const*)':
.../src/appforms/classOpenAreaForm.cpp:86: undefined reference to `vtable
for TOpenAreaForm' collect2: ld returned 1 exit status
the headers of the involved classes:
TControl.h
______________
#ifndef __CONTROL_HPP_
#define __CONTROL_HPP_
class TControl
{
protected:
TControl *parent;
.....
public:
TControl(TControl *parent_);
TControl(TControl *parent_, int left_,int top_,
int width_,int height_,const char* caption_='\0');
virtual ~TControl(void);
....
};
#endif
--------------------
TForm.h
_________________
#include "classControl.hpp"
class TForm : public TControl {
protected:
virtual void Draw(void);
public:
TForm(TControl *parent_);
TForm(TControl *parent_, int left_, int top_, int width_,
int height_, const char* caption_);
.......
};
....
#endif
--------------------
TOpenAreaForm.h
_________________
#ifndef __OPENAREAFORM_HPP_
#define __OPENAREAFORM_HPP_
#include "../appgui/classForm.hpp"
// forward declaration
class TListView;
class TOpenAreaForm : public TForm {
public:
TOpenAreaForm(TControl *parent_);
TOpenAreaForm(TControl *parent_, int left_, int top_,
int width_, int height_, const char* caption_);
~TOpenAreaForm(void);
TListView* filelist;
void RefreshListItems(void);
};
....
#endif