无法调用CFont类的成员函数
为什么无法调用CFont类的成员函数。如下代码:
CFont* font = (CFont*)iEikonEnv->NormalFont();
TPtrC myLongString( _L( "blacktext" ) );
TInt width = font->TextWidthInPixels(myLongString);
编译出错:
------------------------------------------
tool exit status == 1
Errors caused tool to abort.
Link Error : Undefined symbol: 'int CFont::TextWidthInPixels(class TDesC16 const &) const (?TextWidthInPixels@CFont@@QBEHABVTDesC16@@@Z)'
referenced from 'void CHelloWorldView::Draw(class TRect const &) const (?Draw@CHelloWorldView@@MBEXABVTRect@@@Z)' in HelloWorldView.cpp:158
------------------------------------------
如何解决呢