C++ Builder 怎么才能导出接口
class IShowUI{
virtual TStrings* ShowDialog(TModelBase* AModelBase,String ANameSpace);
};
class TNhiMap : public IShowUI {
public:
TStrings* ShowDialog(TModelBase* AModelBase,String ANameSpace);
};
TStrings* TNhiMap::ShowDialog(TModelBase* AModelBase,String ANameSpace)
{
TStrings* ret = new TStringList();
TNhiMapDlg* nhiMapDlg = new TNhiMapDlg(NULL);
if(nhiMapDlg->ShowModal()==mrOk)
{
ret->Add("Hello World");
}
nhiMapDlg->Free();
return ret;
}
//
extern "C" __declspec(dllexport) IShowUI* __stdcall Test()
{
IShowUI* showUi = new TNhiMap();
return showUi;
}
编译时出现
[解决办法]
变成个纯虚函数有啥用?
[解决办法]
解决就好