×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    3

    [newbie here] Link error

    hi, im using codewarrior (sdk series 80) and i try to extend the wizard helloworldplus application with an 'about box', like this example:
    http://www.symbian.com/developer/tec...okia_9200.html

    The program give me link error, and i'm not able to solve it!
    so, please if u can help me..

    more info:
    MMP file:
    TARGET HelloWorldPlus.app
    TARGETTYPE app

    // change the second number here ot change the UID for this application
    UID 0x100039CE 0x10005b95
    TARGETPATH \system\apps\helloworldplus

    SOURCEPATH ..\src
    SOURCE HelloWorldPlus.cpp
    SOURCE HelloWorldPlusApplication.cpp
    SOURCE HelloWorldPlusAppView.cpp
    SOURCE HelloWorldPlusAppUi.cpp
    SOURCE HelloWorldPlusDocument.cpp
    SOURCE HelloWorld_Dialogs.cpp


    SOURCEPATH ..\group
    RESOURCE HelloWorldPlus.rss

    USERINCLUDE ..\inc

    SYSTEMINCLUDE \epoc32\include

    LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
    LIBRARY linkui.lib linkmdl.lib eikdlg.lib eikcoctl.lib


    the exact code that give me link error is this (in HandleCommandL, appui):
    case EHelloWorldPlusCommand1:
    {

    CEikDialog* dialog=new(ELeave) CHelloAboutDialog(TVersion(KVersionMajor,KVersionMinor, KVersionBuild));

    // Execute the dialog using our R_EXAMPLE_ABOUT_DIALOG resource definition to
    // govern how the dialog appears on screen

    dialog->ExecuteLD(R_EXAMPLE_ABOUT_DIALOG);

    }
    break;

    --------------


    My dialog is this:
    #include "HelloWorldPlusApplication.h"
    #include "HelloAboutDialog.h"
    #include <eikenv.h>


    //
    // Class CHelloAboutDialog
    //
    CHelloAboutDialog::CHelloAboutDialog(const TVersion& aVersionInfo):iVersionInfo(aVersionInfo)
    {
    }

    // PreLayoutDynInitL() is a class in the CEikDialog
    // framework called before the dialog is shown on screen.
    // It allows us to, for example, manipulate the contents
    // of controls on the dialog at runtime before the user
    // sees them. In this case, we set one of the labels
    // to show our application version information.

    void CHelloAboutDialog::PreLayoutDynInitL()
    {
    TBuf<80> versionText1;
    TBuf<80> versionText2;
    iEikonEnv->ReadResource(versionText1, R_EXAMPLE_ABOUT_DIALOG_VERSION_LABEL);

    versionText2.Format(versionText1,iVersionInfo.iMajor,iVersionInfo.iMinor, iVersionInfo.iBuild);

    CEikLabel* versionLabel = (CEikLabel*)Control(EDialogAboutVersionLine);
    versionLabel->SetTextL(versionText2);
    }


    My dialog.h code is this:
    #ifndef __HELLOAboutDialog_H__
    #define __HELLOAboutDialog_H__

    #include <eikdialg.h> // CEikDialog
    #include <eiklabel.h> // CEikLabel
    #include "HelloWorldPlus.hrh"

    //const TUid KUidHelloWorldNokia9200Series = { 0x101F43AB };
    const TInt KVersionMajor = 1;
    const TInt KVersionMinor = 0;
    const TInt KVersionBuild = 3;

    class CHelloAboutDialog : public CEikDialog
    {
    public:
    CHelloAboutDialog(const TVersion& aVersionInfo);
    private: // from CEikDialog
    void PreLayoutDynInitL();
    private:
    TVersion iVersionInfo;
    };
    #endif // __HELLOAboutDialog_H__


    And link errors are this:

    Errors caused tool to abort.


    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'CEikDialog::CEikDialog(void) (??0CEikDialog@@QAE@XZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'CHelloAboutDialog::CHelloAboutDialog(class TVersion const &) (??0CHelloAboutDialog@@QAE@ABVTVersion@@@Z)' i
    n HelloWorld_Dialogs.cpp:12
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'class CCoeControl * CEikDialog::Control(int) const (?Control@CEikDialog@@QBEPAVCCoeControl@@H@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'void CHelloAboutDialog::PreLayoutDynInitL(void) (?PreLayoutDynInitL@CHelloAboutDialog@@EAEXXZ)' in HelloWor
    ld_Dialogs.cpp:31
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::Reserved_4(void) (?Reserved_4@CEikDialog@@EAEXXZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::Reserved_3(void) (?Reserved_3@CEikDialog@@EAEXXZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::SetSizeAndPosition(class TSize const &) (?SetSizeAndPosition@CEikDialog@@MAEXABVTSize@@@
    Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::HandleInteractionRefused(int) (?HandleInteractionRefused@CEikDialog@@MAEXH@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::HandleControlStateChangeL(int) (?HandleControlStateChangeL@CEikDialog@@MAEXH@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::SetInitialCurrentLine(void) (?SetInitialCurrentLine@CEikDialog@@MAEXXZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::PostLayoutDynInitL(void) (?PostLayoutDynInitL@CEikDialog@@MAEXXZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'int CEikDialog::OkToExitL(int) (?OkToExitL@CEikDialog@@MAEHH@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::HandleControlEventL(class CCoeControl *, enum MCoeControlObserver::TCoeEvent) (?HandleCo
    ntrolEventL@CEikDialog@@MAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from '@44@?HandleControlEventL@CEikDialog@@MAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z' in HELLOWORLD
    _DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::Reserved_2(void) (?Reserved_2@CEikDialog@@EAEXXZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::FocusChanged(enum TDrawNow) (?FocusChanged@CEikDialog@@EAEXW4TDrawNow@@@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::ConstructFromResourceL(class TResourceReader &) (?ConstructFromResourceL@CEikDialog@@EAE
    XAAVTResourceReader@@@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'class TSize CEikDialog::MinimumSize(void) (?MinimumSize@CEikDialog@@EAE?AVTSize@@XZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'void CEikDialog::SizeChanged(void) (?SizeChanged@CEikDialog@@EAEXXZ)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : Undefined symbol: 'class CCoeControl * CEikDialog::ComponentControl(int) const (?ComponentControl@CEikDialog@@EBEPAVCCoeCont
    rol@@H@Z)'
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    Link Error : referenced from 'const CHelloAboutDialog::`vftable' (??_7CHelloAboutDialog@@6B@)' in HELLOWORLD_DIALOGS.o
    Project: helloworldplus.mcp, Target: WINSCW UDEB

    ...
    too long
    ...
    ..
    .

    Link Error : Link failed
    Project: helloworldplus.mcp, Target: WINSCW UDEB

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    3
    ok i find adding the right library in codewarrior (not in .mmp) ....
    now it works

    hi

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    26

    Re: [newbie here] Link error

    how did u do that, cuz I'm facing same type of errors ... but I'm using Carbide C++ IDE

  4. #4
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: [newbie here] Link error

    Check this thread by antonypr: Compilation error in carbide.c++.

Posting Permissions

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