×

Discussion Board

Results 1 to 5 of 5

Thread: Link errors

  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    124

    Hello again!!!

    i wrote a code like BossPuzzle example , ofcourse modified!
    whwn i compile .cpp no errors!
    When i Build look:
    Doing first-stage link by name
    link.exe @C:\DOCUME~1\Jock\LOCALS~1\Temp\nma02736.
    Creating library \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.lib and object \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\W
    INS\UDEB\SAMBATA2.exp
    LINK : warning LNK4005: no objects used from library \Symbian\6.0\NokiaCPP\EPOC32\RELEASE\WINS\UDEB\SAMBATA2ENG.LIB
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall CSambata2AppUi::HandleModelChangeL(void)" (?HandleModelChangeL@CSambata2AppUi@@EAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::CmdFileRevertL(void)" (?CmdFileRevertL@CSambata2AppUi@@AAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::OpenFileL(class TBuf<256> const &)" (?OpenFileL@CSambata2AppUi@@AAEXABV?$TBuf@$0BAA@@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::SetInitialPathL(class TBuf<256> &)const " (?SetInitialPathL@CSambata2AppUi@@ABEXAAV?$TBuf@$0BAA@@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: static int __cdecl CCknOpenFileDialog::RunLD(class MCknOpenFileDialogObserver *,class TDes16 &,unsigned int)" (?RunLD@CCknOpenFileDialog@@CAHPAVMCknOpenFileDialogObserver@@AAVTDes16@
    @I@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::CreateFileL(class TBuf<256> &)" (?CreateFileL@CSambata2AppUi@@AAEXAAV?$TBuf@$0BAA@@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: static int __cdecl CCknNewFileDialog::RunLD(class TDes16 &,int,unsigned int,class TUid)" (?RunLD@CCknNewFileDialog@@CAHAAVTDes16@@HIVTUid@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: int __thiscall RFs:elete(class TDesC16 const &)" (?Delete@RFs@@QAEHABVTDesC16@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: int __thiscall RFs::Entry(class TDesC16 const &,class TEntry &)const " (?Entry@RFs@@QBEHABVTDesC16@@AAVTEntry@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: static int __cdecl CCknSaveAsFileDialog::RunLD(class TDes16 &,int,class TDataType *,class MCknConversionUi *,unsigned int,class TUid)" (?RunLD@CCknSaveAsFileDialog@@CAHAAVTDes16@@HPA
    VTDataType@@PAVMCknConversionUi@@IVTUid@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindowBase::SetShadowDisabled(int)" (?SetShadowDisabled@RWindowBase@@QAEXH@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: class TPoint __thiscall MGraphicsDeviceMap::TwipsToPixels(class TPoint const &)const " (?TwipsToPixels@MGraphicsDeviceMap@@QBE?AVTPoint@@ABV2@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: __thiscall TFontSpec::TFontSpec(class TDesC16 const &,int)" (??0TFontSpec@@QAE@ABVTDesC16@@H@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWriteStream::WriteInt8L(int)" (?WriteInt8L@RWriteStream@@QAEXH@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: signed char __thiscall RReadStream::ReadInt8L(void)" (?ReadInt8L@RReadStream@@QAECXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWriteStream::CommitL(void)" (?CommitL@RWriteStream@@QAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: class TStreamId __thiscall RStoreWriteStream::CreateLC(class CStreamStore &)" (?CreateLC@RStoreWriteStream@@QAE?AVTStreamId@@AAVCStreamStore@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RStoreReadStream::OpenLC(class CStreamStore const &,class TStreamId)" (?OpenLC@RStoreReadStream@@QAEXABVCStreamStore@@VTStreamId@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindow::Invalidate(class TRect const &)" (?Invalidate@RWindow@@QAEXABVTRect@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindow::EndRedraw(void)" (?EndRedraw@RWindow@@QAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindow::BeginRedraw(class TRect const &)" (?BeginRedraw@RWindow@@QAEXABVTRect@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RDrawableWindow::Scroll(class TRect const &,class TPoint const &)" (?Scroll@RDrawableWindow@@QAEXABVTRect@@ABVTPoint@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: class TStreamId __thiscall CStreamDictionary::At(class TUid)const " (?At@CStreamDictionary@@QBE?AVTStreamId@@VTUid@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall CStreamDictionary::AssignL(class TUid,class TStreamId)" (?AssignL@CStreamDictionary@@QAEXVTUid@@VTStreamId@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: static class CStreamDictionary * __cdecl CStreamDictionary::NewL(void)" (?NewL@CStreamDictionary@@SAPAV1@XZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RReadStream::Release(void)" (?Release@RReadStream@@QAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall CStreamDictionary::InternalizeL(class RReadStream &)" (?InternalizeL@CStreamDictionary@@QAEXAAVRReadStream@@@Z)
    \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.APP : fatal error LNK1120: 27 unresolved externals
    NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
    Stop.
    if exist "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.exp" del "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBA
    TA2.exp"
    Stopped the build by removing the export object,
    if present, because the pre-link stage failed
    Linking...
    LINK : fatal error LNK1104: cannot open file "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.exp"
    Error executing link.exe.

    SAMBATA2.APP - 30 error(s), 1 warning(s)
    What is wrong!
    i included all! is something else?

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    196

    MMP definitions

    You should edit your .mmp file and state all libraries that you are using.
    This "unresolved external symbol" means that the linker can't link your code to the right library DLLs because you haven't specified which libraries to use.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    124

    again and again

    Look at my mmp file:
    TARGET Sambata2.app
    TARGETTYPE app
    UID 0x100039ce 95
    TARGETPATH \system\apps\Sambata2
    SOURCEPATH ..\gui
    SOURCE Sambata2.cpp
    RESOURCE Sambata2.rss
    USERINCLUDE ..\inc
    SYSTEMINCLUDE \epoc32\include
    LIBRARY Sambata2eng.lib
    LIBRARY euser.lib apparc.lib cone.lib eikcore.lib CKNDLG.LIB gdi.lib ws32.lib estor.lib efsrv.lib
    and i have the same errors!
    What is the problem???
    My ERRORS:
    Doing first-stage link by name
    link.exe @C:\DOCUME~1\Jock\LOCALS~1\Temp\nma01384.
    Creating library \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.lib and object \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\W
    INS\UDEB\SAMBATA2.exp
    LINK : warning LNK4005: no objects used from library \Symbian\6.0\NokiaCPP\EPOC32\RELEASE\WINS\UDEB\SAMBATA2ENG.LIB
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall CSambata2AppUi::HandleModelChangeL(void)" (?HandleModelChangeL@CSambata2AppUi@@EAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::CmdFileRevertL(void)" (?CmdFileRevertL@CSambata2AppUi@@AAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::OpenFileL(class TBuf<256> const &)" (?OpenFileL@CSambata2AppUi@@AAEXABV?$TBuf@$0BAA@@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::SetInitialPathL(class TBuf<256> &)const " (?SetInitialPathL@CSambata2AppUi@@ABEXAAV?$TBuf@$0BAA@@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: static int __cdecl CCknOpenFileDialog::RunLD(class MCknOpenFileDialogObserver *,class TDes16 &,unsigned int)" (?RunLD@CCknOpenFileDialog@@CAHPAVMCknOpenFileDialogObserver@@AAVTDes16@
    @I@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: void __thiscall CSambata2AppUi::CreateFileL(class TBuf<256> &)" (?CreateFileL@CSambata2AppUi@@AAEXAAV?$TBuf@$0BAA@@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: static int __cdecl CCknNewFileDialog::RunLD(class TDes16 &,int,unsigned int,class TUid)" (?RunLD@CCknNewFileDialog@@CAHAAVTDes16@@HIVTUid@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: int __thiscall RFs:elete(class TDesC16 const &)" (?Delete@RFs@@QAEHABVTDesC16@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: int __thiscall RFs::Entry(class TDesC16 const &,class TEntry &)const " (?Entry@RFs@@QBEHABVTDesC16@@AAVTEntry@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "private: static int __cdecl CCknSaveAsFileDialog::RunLD(class TDes16 &,int,class TDataType *,class MCknConversionUi *,unsigned int,class TUid)" (?RunLD@CCknSaveAsFileDialog@@CAHAAVTDes16@@HPA
    VTDataType@@PAVMCknConversionUi@@IVTUid@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindowBase::SetShadowDisabled(int)" (?SetShadowDisabled@RWindowBase@@QAEXH@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: class TPoint __thiscall MGraphicsDeviceMap::TwipsToPixels(class TPoint const &)const " (?TwipsToPixels@MGraphicsDeviceMap@@QBE?AVTPoint@@ABV2@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: __thiscall TFontSpec::TFontSpec(class TDesC16 const &,int)" (??0TFontSpec@@QAE@ABVTDesC16@@H@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWriteStream::WriteInt8L(int)" (?WriteInt8L@RWriteStream@@QAEXH@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: signed char __thiscall RReadStream::ReadInt8L(void)" (?ReadInt8L@RReadStream@@QAECXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWriteStream::CommitL(void)" (?CommitL@RWriteStream@@QAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: class TStreamId __thiscall RStoreWriteStream::CreateLC(class CStreamStore &)" (?CreateLC@RStoreWriteStream@@QAE?AVTStreamId@@AAVCStreamStore@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RStoreReadStream::OpenLC(class CStreamStore const &,class TStreamId)" (?OpenLC@RStoreReadStream@@QAEXABVCStreamStore@@VTStreamId@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindow::Invalidate(class TRect const &)" (?Invalidate@RWindow@@QAEXABVTRect@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindow::EndRedraw(void)" (?EndRedraw@RWindow@@QAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RWindow::BeginRedraw(class TRect const &)" (?BeginRedraw@RWindow@@QAEXABVTRect@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RDrawableWindow::Scroll(class TRect const &,class TPoint const &)" (?Scroll@RDrawableWindow@@QAEXABVTRect@@ABVTPoint@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: class TStreamId __thiscall CStreamDictionary::At(class TUid)const " (?At@CStreamDictionary@@QBE?AVTStreamId@@VTUid@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall CStreamDictionary::AssignL(class TUid,class TStreamId)" (?AssignL@CStreamDictionary@@QAEXVTUid@@VTStreamId@@@Z)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: static class CStreamDictionary * __cdecl CStreamDictionary::NewL(void)" (?NewL@CStreamDictionary@@SAPAV1@XZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall RReadStream::Release(void)" (?Release@RReadStream@@QAEXXZ)
    SAMBATA2.obj : error LNK2001: unresolved external symbol "public: void __thiscall CStreamDictionary::InternalizeL(class RReadStream &)" (?InternalizeL@CStreamDictionary@@QAEXAAVRReadStream@@@Z)
    \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.APP : fatal error LNK1120: 27 unresolved externals
    NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
    Stop.
    if exist "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.exp" del "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBA
    TA2.exp"
    Stopped the build by removing the export object,
    if present, because the pre-link stage failed
    Linking...
    LINK : fatal error LNK1104: cannot open file "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\SAMBATA2\GUI\SAMBATA2\WINS\UDEB\SAMBATA2.exp"
    Error executing link.exe.

    SAMBATA2.APP - 30 error(s), 1 warning(s)

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    124

    pls help me!

    i have the same errors!

  5. #5
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52
    For each unresolved symbol look for the Class in the Series 60 SDK Reference.
    example for error LNK2001: unresolved external symbol "public: int __thiscall RFs:elete(class TDesC16 const &)" (?Delete@RFs@@QAEHABVTDesC16@@@Z)

    Location: f32file.h
    Link against: efsrv.lib

    so you should have
    LIBRARY efsrv.lib
    in .mmp

    Check also that you included a SOURCE line for every .cpp of your project

Posting Permissions

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