Why do I get "Undefined symbol" for code in the ConstructL method?

Login to reply to this topic.
Fri, 2008-02-22 20:35
Joined: 2008-02-12
Forum posts: 37

I am just starting with Symbian C++ and I am trying to get animation to work. I have a class for double buffering and I call the Bitmap classes from the ConstructL method with this code:

iAreaBitmap = new (ELeave) CFbsBitmap();
iAreaBitmap->Create(aSize, aDisplayMode);
iAreaBitmapDevice = CFbsBitmapDevice::NewL(iAreaBitmap);
iAreaBitmapDevice->CreateContext(iAreaBitmapContext);

but I get these errors:

Undefined symbol: 'CFbsBitmap::CFbsBitmap(void) (??0CFbsBitmap@@QAE@XZ)'[] HelloWorldBasic Unknown 1203707929284 422
Undefined symbol: 'class CFbsBitmapDevice * CFbsBitmapDevice::NewL(class CFbsBitmap *) (?NewL@CFbsBitmapDevice@@SAPAV1@PAVCFbsBitmap@@@Z)'[] HelloWorldBasic Unknown 1203707929285 424
Undefined symbol: 'int CFbsBitmap::Create(class TSize const &, enum TDisplayMode) (?Create@CFbsBitmap@@QAEHABVTSize@@W4TDisplayMode@@@Z)'[] HelloWorldBasic Unknown 1203707929285 423
Undefined symbol: 'int CFbsDevice::CreateContext(class CFbsBitGc * &) (?CreateContext@CFbsDevice@@QAEHAAPAVCFbsBitGc@@@Z)'[] HelloWorldBasic Unknown 1203707929285 425

The header file for the bitmap classes is included, so I wonder why I get "Undefined symbol" error. When I move the code to another method then ConstructL I don't get any errors.What can I do to get rid of the "Undefined symbol" errors?


Sat, 2008-02-23 08:31
Joined: 2003-12-05
Forum posts: 607
Re: Why do I get "Undefined symbol" for code in the..

You need to add the .lib to your mmp file which includes these classes.

Sat, 2008-02-23 08:34
Joined: 2005-11-20
Forum posts: 1144
Check the "Link against" entries in the SDK pages

Yup. See e.g.
http://www.newlc.com/topic-889


René Brunner

Sat, 2008-02-23 10:12
Joined: 2008-02-12
Forum posts: 37
Re: Why do I get "Undefined symbol" for code in the ConstructL m

I got the simple animation to work! I sent a free download of my company's product Astral effects (contains 10 hypnotic visuals) to you as thanks for the help. I am planning to make a Symbian screensaver of one of the visuals in Astral effects.

  • Login to reply to this topic.