please,Help me!!

Login to reply to this topic.
Sun, 2007-04-15 09:12
Joined: 2007-04-10
Forum posts: 15
sorry.I don't speak well.
my code
void CSimpleExAppView::Draw( const TRect& /*aRect*/ ) const
    {
    // Get the standard graphics context
    CWindowGc& gc = SystemGc();
   const CFont*   font;
   TRect   drawRect=Rect();
    // Gets the control's extent
    //TRect drawRect( Rect());
   //HeightInPixels())/
    // Clears the screen
    gc.Clear( drawRect );
    font=iEikonEnv->TitleFont();
    gc.UseFont(font);
    TInt baselineOffset=(drawRect.Height() - font->HeightInPixels())/2;
    gc.DrawText(_L("Simple Text Draw"),drawRect,baselineOffset,CGraphicsContext::ECenter,0);
    gc.DiscardFont();
     }


when complier have one err.this is error.
"
Severity   Description   Resource   In Folder   Location   Creation Time   Id
2   Undefined symbol: 'int CFont::HeightInPixels(void) const (?HeightInPixels@CFont@@QBEHXZ)' referenced from 'void CSimpleExAppView::Draw(class TRect const &) const (?Draw@CSimpleExAppView@@UBEXABVTRect@@@Z)' in SimpleExAppView.cpp:99   SimpleEx      line 0   January 3, 2004 3:06:29 PM   1065
"

Thank you.
utcuong3010.Vietnam.

Sun, 2007-04-15 09:21
Joined: 2005-11-20
Forum posts: 1143
Re: please,Help me!!
You probably did not add gdi.lib to your .mmp file.

René Brunner

Sun, 2007-04-15 10:33
Joined: 2007-04-10
Forum posts: 15
Re: please,Help me!!
i added gid into mmp-->>have error on..

thanks

utcuong3010
Sun, 2007-04-15 11:05
Joined: 2005-11-20
Forum posts: 1143
Re: please,Help me!!
With "have error on", do you mean that you still have an error, even after adding gdi.lib (gdi, not gid) to your .mmp file, in the library section, like
Code:
LIBRARY gdi.lib

Still error, exactly the same, or another one?

René Brunner

Sun, 2007-04-15 19:14
Joined: 2007-04-10
Forum posts: 15
Re: please,Help me!!
i added "gdi.lib" into mmp file.but i complied still have same error

here's my error:
Severity   Description   Resource   In Folder   Location   Creation Time   Id
2   Undefined symbol: 'int CFont::HeightInPixels(void) const (?HeightInPixels@CFont@@QBEHXZ)' referenced from 'void CDrawAppView::Draw(class TRect const &) const (?Draw@CDrawAppView@@UBEXABVTRect@@@Z)' in DrawAppView.cpp:101   Draw      line 0   January 4, 2004 1:12:07 AM   1380



I used IDE carbide C++ and SDK 3 Symbian OS 9.1.

thanks a lot.
utcuong3010.vietnam
Sun, 2007-04-15 20:29
Joined: 2005-11-20
Forum posts: 1143
Re: please,Help me!!
Well, I don't work with Carbide++, but program "by hand"...

Maybe this earlier thread tells how to add a new library like gdi.lib when working with Carbide++:
http://forum.newlc.com/index.php/topic,15556.0.html

René Brunner

Mon, 2007-04-16 07:42
Joined: 2007-04-10
Forum posts: 15
Re: please,Help me!!
Thanks
I sovled this problem.
utcuong3010.VietNam.
Mon, 2007-04-16 09:32
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: please,Help me!!
Quote from: utcuong3010
i added "gdi.lib" into mmp file.but i complied still have same error

here's my error:
Severity   Description   Resource   In Folder   Location   Creation Time   Id
2   Undefined symbol: 'int CFont::HeightInPixels(void) const (?HeightInPixels@CFont@@QBEHXZ)' referenced from 'void CDrawAppView::Draw(class TRect const &) const (?Draw@CDrawAppView@@UBEXABVTRect@@@Z)' in DrawAppView.cpp:101   Draw      line 0   January 4, 2004 1:12:07 AM   1380



I used IDE carbide C++ and SDK 3 Symbian OS 9.1.

thanks a lot.
utcuong3010.vietnam


Although you have solved your problem, since you have choosen not to mention the solution, I would like to provide some additional info regarding the same to fellow-developers in similar type of trouble.

Carbide.c++ does not recognise mmp file. You must either add the lib in its properties or if you choose to add to the mmp file, you need to re-import the project.
Hope it helps.

Good Luck and Cheers
Neil
  • Login to reply to this topic.