Hi,
I will explain why this link error is happening but I do not know how to fix it.
Plesae take a look to the following code:-
// ---------------------------------------------------------
// CSMRCContainer::ConstructListBoxItemArray()
// ---------------------------------------------------------
//
void CSMRCContainer::ConstructListBoxItemArray()
{
//when using resource file - we do not need the listbox item format string
_LIT(KListItemFormat, "%d\t%S\t\t");
CDesCArray *itemList = new (ELeave) CDesCArrayFlat(3);
TBuf<32> item;
TInt idx=1;
// append items to the listbox, incrementing numbering
item.Format(KListItemFormat, idx, _L("first item"));
itemList->AppendL(item); idx++;
item.Format(KListItemFormat, idx, _L("another item"));
itemList->AppendL(item); idx++;
item.Format(KListItemFormat, idx, _L("last item"));
itemList->AppendL(item); idx++;
// set items and ownership to the listbox
iListBox->Model()->SetItemTextArray(itemList);
iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
// update listbox and redrawing it
iListBox->HandleItemAdditionL();
}
The link erros happens because of the following instruction call:-
CDesCArray *itemList = new (ELeave) CDesCArrayFlat(3);
The compiler gives me the following compile error before throwing th elinkage error:
Undefined symbol: 'CDesC16ArrayFlat::CDesC16ArrayFlat(int) (??0CDesC16ArrayFlat@@QAE@H@Z)'
I could not find out how to use CDesCArrayFlat in "Series 60 3rd Edition SDK for Symbian OS".
Please try to help

Reply With Quote

