×

Discussion Board

Results 1 to 2 of 2

Thread: linking error

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    43

    Question linking error

    Hi,

    I would like to port my linux app to symbian platform. I am using pips/openc/stlport libraries.
    If I compile my project I get this meassage:

    ---------

    [B]
    mwldsym2.exe: files main.o, main.o
    mwldsym2.exe: Multiply defined section: int rc_base_folder(class std::vector<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> >, class std::allocator<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > > > const &) (?rc_base_folder@@YAHABV?$vector@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) in
    mwldsym2.exe: files main.o, main.o
    mwldsym2.exe: Multiply defined section: int rc_podcast_folder(class std::vector<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> >, class std::allocator<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > > > const &) (?rc_podcast_folder@@YAHABV?$vector@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) in
    mwldsym2.exe: files main.o, main.o
    mwldsym2.exe: Multiply defined section: int rc_xml_config(class std::vector<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> >, class std::allocator<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > > > const &) (?rc_xml_config@@YAHABV?$vector@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) in
    mwldsym2.exe: files main.o, main.o
    mwldsym2.exe: Multiply defined section: int rc_peer_id(class std::vector<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> >, class std::allocator<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > > > const &) (?rc_peer_id@@YAHABV?$vector@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) in
    mwldsym2.exe: files main.o, main.o
    mwldsym2.exe: Multiply defined section: int rc_test(class std::vector<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> >, class std::allocator<class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > > > const &) (?rc_test@@YAHABV?$vector@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) in

    Errors caused tool to abort.
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _setvbuf in
    mwldsym2.exe: warning: files buffer_io.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _feof in
    mwldsym2.exe: warning: files misc_io.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _ferror in
    mwldsym2.exe: warning: files misc_io.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _ftell in
    mwldsym2.exe: warning: files file_pos.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _fgetpos in
    mwldsym2.exe: warning: files file_pos.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _fseek in
    mwldsym2.exe: warning: files file_pos.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _fsetpos in
    mwldsym2.exe: warning: files file_pos.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strlen in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strcpy in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strncpy in
    make[1]: *** [\Symbian\9.1\S60_3rd_MR\EPOC32\RELEASE\WINSCW\UDEB\podnetsymbian.exe] Error 1
    make: *** [TARGETPODNETSYMBIAN] Error 2
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strcat in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strncat in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strcmp in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strncmp in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strchr in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strpbrk in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strtok in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _strstr in
    mwldsym2.exe: warning: files string.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _abort in
    mwldsym2.exe: warning: files abort_exit_win32.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _exit in
    mwldsym2.exe: warning: files abort_exit_win32.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _fclose in
    mwldsym2.exe: warning: files file_io.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _fflush in
    mwldsym2.exe: warning: files file_io.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _fopen in
    mwldsym2.exe: warning: files file_io.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _malloc in
    mwldsym2.exe: warning: files alloc.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _free in
    mwldsym2.exe: warning: files alloc.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: warning: Multiply defined section: _realloc in
    mwldsym2.exe: warning: files alloc.c.obj (MSL_All_MSE_Symbian_D.lib), libc.dll (stlport_s.lib),
    mwldsym2.exe: warning: keeping definition in libc.dll
    mwldsym2.exe: Undefined symbol: 'int E32Main(void) (?E32Main@@YAHXZ)'
    mwldsym2.exe: referenced from '__E32Startup' in uc_exe.cpp:46 (EEXE.LIB)
    make[1]: Leaving directory `C:/Symbian/Carbide/workspace/podnetsymbian/group'
    make -r -f "\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\Symbian\Carbide\workspace\podnetsymbian\group\WINSCW.make" FINAL CFG=UDEB

    --------------
    And here is my mmp file, I think here is the problem:
    --------
    TARGET podnetsymbian.exe
    TARGETTYPE exe
    UID 0 0xE3CE45CA

    USERINCLUDE ..
    USERINCLUDE ..\PI
    USERINCLUDE ..\tinyxml

    SYSTEMINCLUDE \epoc32\include
    SYSTEMINCLUDE \epoc32\include\stdapis
    SYSTEMINCLUDE \epoc32\include\stdapis\sys
    SYSTEMINCLUDE \epoc32\include\stlport
    SYSTEMINCLUDE \epoc32\include\libc

    LIBRARY euser.lib libc.lib libpthread.lib

    .
    .
    .

    SOURCEPATH ..\group
    START RESOURCE podnetsymbian.rss
    HEADER
    TARGETPATH \resource\apps
    END

    START RESOURCE podnetsymbian_reg.rss
    TARGETPATH \private\10003a3f\apps
    END

    STATICLIBRARY stlport_s.lib

    -----------
    Could somebody help me??? Which libraries should I add the mmp file? Or what...?

    dako

  2. #2
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    83

    Re: linking error

    Hello,

    SYSTEMINCLUDE \epoc32\include
    SYSTEMINCLUDE \epoc32\include\stdapis
    SYSTEMINCLUDE \epoc32\include\stdapis\sys
    SYSTEMINCLUDE \epoc32\include\stlport
    SYSTEMINCLUDE \epoc32\include\libc


    Do not include libc. Actually, i really don't know why this folder exists... Well,the thing is that you need only to include stadapis.

    Some link warnings will still occur, but i think that this will let you execute your app.

    []s,
    Vitor.

Similar Threads

  1. CPbkContactEditorDlg customize
    By asdfghjkl_asdfghjkl in forum Symbian
    Replies: 5
    Last Post: 2008-08-05, 02:56
  2. compilation error: identifier redeclared
    By netra in forum Symbian
    Replies: 2
    Last Post: 2007-06-22, 10:42
  3. carbidec++ helloworld project problem
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-03-11, 12:40
  4. code warrior problems
    By mayankkedia in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2004-10-25, 06:59
  5. camera app compilation problems
    By basarim in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-12-31, 18:16

Posting Permissions

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