×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    2

    Question fatal error LNK1169: one or more multiply defined symbols found

    Hello all,

    I am trying to complete the Carbide.VS tutorial from Mopius.

    While building the code get the following errors:

    1. hello error LNK2005: "class CFbsBitmap * iImage1" (?iImage1@@3PAVCFbsBitmap@@A) already defined in helloContainer.obj

    2. hello warning LNK4006: "class CFbsBitmap * iImage1" (?iImage1@@3PAVCFbsBitmap@@A) already defined in helloContainer.obj; second definition ignored

    3. hello fatal error LNK1169: one or more multiply defined symbols found

    I am a complete newbie to development on symbian OS.

    please guide.

    Cheers
    ThinRhino

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: fatal error LNK1169: one or more multiply defined symbols found

    Exactly where and how do you declare the variable "iImage1"?

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    2

    Re: fatal error LNK1169: one or more multiply defined symbols found

    It has been quite some time since I posted on mailing lists. I forgot to post the necessary details.

    SDK: S60 V 8.0a

    helloworldcontainer.cpp

    void ChelloWorldContainer::ConstructL(const TRect& aRect)
    {
    ...

    TFileName fullName(KMbmFileName);
    CompleteWithAppPath(fullName);

    iImage = new (ELeave) CFbsBitmap();
    User::LeaveIfError(iImage->Load(fullName, EMbmHelloworldLogo));

    ...
    }

    void ChelloWorldContainer::Draw(const TRect& aRect) const
    {
    ...
    gc.BitBlt( TPoint(0,0), iImage);
    ...
    }

    helloworldcontainer.h

    #include <aknutils.h>
    #include <fbs.h>
    #include "helloWorld.mbg"
    _LIT (KMbmFileName, "helloWorld.mbm");

    class ChelloWorldContainer : public CCoeControl, MCoeControlObserver
    {
    ...

    Private:
    CFbsBitmap* iImage;

    ...
    };

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: fatal error LNK1169: one or more multiply defined symbols found

    I really meant iImage1. I think you have declared iImage1 in a header file, outside a class-scope, thus it gets declared as a global variable every time you include the given file. And since it is global, the application will not compile for target device.

Similar Threads

  1. Problems with errno module
    By tsharju in forum Symbian
    Replies: 1
    Last Post: 2005-10-21, 11:24
  2. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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