×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    7

    Link errors when trying to Display bitmap

    Hi, I have modified an example file to display a bitmap file. However, when I compile it, I get 2 link errors:
    Code:
    S60test error LNK2019: unresolved external symbol "public: __thiscall CFbsBitmap::CFbsBitmap(void)" (??0CFbsBitmap@@QAE@XZ) referenced in function "private: void __thiscall CS60TestAppView::ConstructL(class TRect const &)" (?ConstructL@CS60TestAppView@@AAEXABVTRect@@@Z)
    
    S60test error LNK2019: unresolved external symbol "public: int __thiscall CFbsBitmap::Load(class TDesC16 const &,long,int)" (?Load@CFbsBitmap@@QAEHABVTDesC16@@JH@Z) referenced in function "public: virtual void __thiscall CS60TestAppView::Draw(class TRect const &)const " (?Draw@CS60TestAppView@@UBEXABVTRect@@@Z)
    Anybody got an idea as how to fix this. Here is my code:
    Code:
    #include <coemain.h>
    #include <eikenv.h>
    #include <fbs.h>//added
    #include <gdi.h>//added
    
    #include "S60TestAppView.h"
    #include "S60TestDocument.h"
    
    CS60TestAppView *CS60TestAppView::NewL(const TRect& aRect, CS60TestDocument *aDoc)
    {
      CS60TestAppView *self=CS60TestAppView::NewLC(aRect, aDoc);
      CleanupStack::Pop(self);
      return self;
    }
    
    CS60TestAppView* CS60TestAppView::NewLC(const TRect& aRect, CS60TestDocument *aDoc)
    {
      CS60TestAppView *self=new(ELeave) CS60TestAppView(aDoc);
      CleanupStack::PushL(self);
      self->ConstructL(aRect);
      return self;
    }
    
    CS60TestAppView::CS60TestAppView(CS60TestDocument *aDoc)
    {
      iDoc=aDoc;
      
    }
    
    CS60TestAppView::~CS60TestAppView()
    {
    }
    
    void CS60TestAppView::ConstructL(const TRect& aRect)
    {
    	iBitmap = new (ELeave) CFbsBitmap();
      CreateWindowL();
      SetRect(aRect);
      
    
      ActivateL();
    }
    
    void CS60TestAppView::Draw(const TRect& /*aRect*/) const
    {
      CBitmapContext &gc=SystemGc();
      TRect rect=Rect();
      gc.Clear(rect);
    
      /*TBuf<64> napis;
      _LIT(format, "Drawing area %dx%d");
      napis.Format(format, rect.Width(), rect.Height());
      gc.UseFont(iCoeEnv->NormalFont());
      gc.DrawText(napis, TPoint(5, 50));*/
      _LIT(KDrawBitmapPath, "system\\apps\\Step1\\bitmap\\testbmp.mbm");
      
      User::LeaveIfError(iBitmap->Load(KDrawBitmapPath, 0));
      gc.DrawBitmap(TPoint(0, 0), iBitmap);
    }

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    7

    Re: Link errors when trying to Display bitmap

    Ok I fixed the link issues using this method.here Now the program will compile, but as soon as I execute it, it crashes with a System Error. I have posted the output log if anyone interested. Please let me know if you have any ideas how to fix it. Thanks.
    Code:
    Starter:EnvChange 4
    Thread ID 0x81c is AppRun00
    NewThread epoc[00000000]0001::AppRun00
    SharedData: Assign to 0x100058ec by EikAppUiServer
    SharedData: total allocated memory: 6176
    SharedData: Get request with key "ColPal" by EikAppUiServer
    'epoc.exe': Loaded 'C:\Symbian\6.1\Series60\Epoc32\Release\wins\udeb\z\system\apps\Step1\Step1.app', Symbols loaded.
    'epoc.exe': Unloaded 'C:\Symbian\6.1\Series60\Epoc32\Release\wins\udeb\z\system\apps\Step1\Step1.app'
    'epoc.exe': Loaded 'C:\Symbian\6.1\Series60\Epoc32\Release\wins\udeb\z\system\apps\Step1\Step1.app', Symbols loaded.
    AddLibrary Step1[04545ff1]
    AknLayoutUtils: Rect width -4 > 0
    AknLayoutUtils: Calculated rect -4 different from one from LAF 104
    SharedData: Assign to 0x100058ec by Step1
    SharedData: total allocated memory: 6176
    SharedData: Get request with key "ColPal" by Step1
    'epoc.exe': Unloaded 'C:\Symbian\6.1\Series60\Epoc32\Release\wins\udeb\z\system\apps\Step1\Step1.app'
    RemoveLibrary Step1[04545ff1]
    Starter:EnvChange 4
    The thread 'Win32 Thread' (0x81c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xb7c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x894) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x8c8) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xc78) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xa00) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x34c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x908) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x8ec) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xc70) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xbcc) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x62c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xad4) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xa0) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xc94) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x880) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xfac) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x78c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xa9c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xc68) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x350) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xc8c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x9d8) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0xcc4) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x978) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x82c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x24c) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x5b8) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x890) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x2bc) has exited with code 0 (0x0).
    The program '[3832] epoc.exe: Native' has exited with code 0 (0x0).

Similar Threads

  1. [newbie here] Link error
    By xitpu in forum Symbian
    Replies: 3
    Last Post: 2007-01-24, 16:53
  2. Displaying of Raw Bitmap data in the Display
    By gilly_kumar in forum Symbian
    Replies: 2
    Last Post: 2005-10-10, 18:42
  3. Linking Errors: Pls Help....
    By amanjha14 in forum Symbian
    Replies: 2
    Last Post: 2004-12-03, 09:03
  4. Replies: 2
    Last Post: 2003-08-07, 12:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×