首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Symbian >

对话框的实例化,错得莫明其妙

2013-01-07 
对话框的实例化,错得莫名其妙UI中的菜单代码:void CTransferSMSAppUi::HandleCommandL(TInt aCommand){swi

对话框的实例化,错得莫名其妙
UI中的菜单代码:

void CTransferSMSAppUi::HandleCommandL(TInt aCommand)
{
switch( aCommand )
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;
case ETransferSmsCommand1:
            {
iSmsEngine->SocketListen();
            }
            break;
case EAdd:
{
form = CDialogContactForm::NewL();  //添加以后提示错误
form->ExecuteLD(R_CONTACTFORM_DIALOG);

}
case EDelete:
{
//删除联系人
}
case EAbout:
{

}
break;
        default:
            Panic( ETransferSMSUi );
            break;
        }
}



RSS中的定义
RESOURCE DIALOG r_contactform_dialog
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagWait | EEikDialogFlagCbaButtons; 
buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
form = r_contact_form;
}

提示错误:总共33个T^T


Creation TimeDescriptionResourcePathLocationType
1305357005801Undefined symbol: 'void CEikMenuPane::AddMenuItemsL(int, int, int) (?AddMenuItemsL@CEikMenuPane@@QAEXHHH@Z)'TransferSMSUnknownC/C++ Problem
1305357005802Undefined symbol: 'void CEikDialog::PreLayoutDynInitL(void) (?PreLayoutDynInitL@CEikDialog@@MAEXXZ)'TransferSMSUnknownC/C++ Problem
1305357005803Undefined symbol: 'class CCoeControl * CEikDialog::Control(int) const (?Control@CEikDialog@@QBEPAVCCoeControl@@H@Z)'TransferSMSUnknownC/C++ Problem
1305357005804Undefined symbol: 'void CEikEdwin::SetTextL(class TDesC16 const *) (?SetTextL@CEikEdwin@@QAEXPBVTDesC16@@@Z)'TransferSMSUnknownC/C++ Problem
1305357005805Undefined symbol: 'class CCoeControl * CEikDialog::ControlOrNull(int) const (?ControlOrNull@CEikDialog@@QBEPAVCCoeControl@@H@Z)'TransferSMSUnknownC/C++ Problem
1305357005806Undefined symbol: 'void CEikEdwin::GetText(class TDes16 &) const (?GetText@CEikEdwin@@QBEXAAVTDes16@@@Z)'TransferSMSUnknownC/C++ Problem
1305357005807Undefined symbol: 'void CEikBorderedControl::SetAdjacent(int) (?SetAdjacent@CEikBorderedControl@@UAEXH@Z)'TransferSMSUnknownC/C++ Problem
1305357005808Undefined symbol: 'int CEikBorderedControl::HasBorder(void) const (?HasBorder@CEikBorderedControl@@UBEHXZ)'TransferSMSUnknownC/C++ Problem
1305357005809Undefined symbol: 'void CEikDialog::HandleDialogPageEventL(int) (?HandleDialogPageEventL@CEikDialog@@UAEXH@Z)'TransferSMSUnknownC/C++ Problem






哪里错了呢????include???

纠结了一中午了,还是搞不懂哪里错了~~~~T^T



------解决方案--------------------


Hi,

看上去是链接错误,原因是少库了,修正的方法是在.mmp文件里添加库,比如

LIBRARY eikdlg.lib // CEikDialog

其它的控件/库对应关系可以到SDK帮助文档里查,比如:

"CEikBorderedControl ...Link against: ... eikcoctl.lib"
http://library.forum.nokia.com/topic/S60_5th_Edition_Cpp_Developers_Library/GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6/html/classCEikBorderedControl.html

Regards

Ziteng Chen

热点排行