救急了!!控件继承问题
[code=C/C++][/code]class TTestForm : public TForm
{
private:
/*测试类型*/
const TTestType FTestType;
/*测试名*/
static const String FTestNameArray[];
/*程序类型*/
TAppType FAppType;
/*语言*/
TLanguageType FLanguageType;
/*版本*/
DWORD FTestFormVersion;
/*获取测试名*/
const String __fastcall GetTestName();
protected:
public:
__fastcall TTestForm(TComponent* Owner,
TTestType inTestType,
TAppType inAppType,
TLanguageType inLanguageType,
DWORD inTestFormVersion);
/*开始测试*/
virtual void __fastcall TestRun() = 0;
/*停止测试*/
virtual void __fastcall TestStop() = 0;
/*打开参数*/
virtual void __fastcall LoadPara() = 0;
/*保存参数*/
virtual void __fastcall SavePara() = 0;
/*设置参数为缺省*/
virtual void __fastcall SetParaToDefault() = 0;
/*测试名*/
__property String TestName = {read = GetTestName};
/*测试类型*/
__property TTestType TestType = {read = FTestType};
/*程序类型*/
__property TAppType AppType = {read = FAppType};
/*语言*/
__property TLanguageType LanguageType = {read = FLanguageType};
/*版本号*/
__property DWORD TestFormVersion = {read = FTestFormVersion};
};
以上为基类代码,S省略相关枚举定义
现在我想从上述的基类派生出一个Form出来,具体代码如下
class TMdiChildForm : public TTestForm
{
....
};
其中构造函数如下:
__fastcall TMdiChildForm::TMdiChildForm(TComponent* Owner)
: TTestForm(Owner,ttyJiaoLiu,atyDigitalRPTS,langChinese,1.0)
{
}
为什么会链接错误呢
[Linker Error] Unresolved external 'TTestForm::' referenced from C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\桌面\MPTRS2\TRUNK\MAINFRM\UNIT1.OBJ
[Linker Error] Unresolved external '__fastcall TTestForm::TTestForm(Classes::TComponent *, tagTestType, tagAppType, tagLanguageType, unsigned long)' referenced from C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\桌面\MPTRS2\TRUNK\MAINFRM\UNIT1.OBJ
[解决办法]
[Quote=引用:]
[code=C/C++][/code]class TTestForm : public TForm
{
private:
/*测试类型*/
const TTestType FTestType;
/*测试名*/
static const String FTestNameArray[];
/*程序类型*/
TAppType FAppType;
/*语言*/……
[/Quote]顶一下