×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    2

    Undefined symbol error

    Never mind
    found the solution
    http://discussion.forum.nokia.com/fo...d-Symbol-error

    not the first time i find somthing right after i ask about it...

    YO
    Im new to symbian
    and i got a problem...

    Im using:
    S60 5th Edition SDK v1.0 en

    I have created 2 CBase classes, Cthrow and CThrowValues.

    Cthrow has:
    static RArray<TInt> DiceValues;
    static TInt getSum(); // sum of all values

    CthrowValues has:
    static RArray<CThrow*> DiceThrows;
    static TInt getSum(); // sum of all throws

    when i try to use
    CthrowValues::getSum();

    i get this error:
    Undefined symbol: 'class RArray<class CThrow *> CThrowValues::DiceThrows (?DiceThrows@CThrowValues@@0V?$RArray@PAVCThrow@@@@A)'

    Just in case my mmp file:
    Code:
    TARGET			Dice_Thrower.exe
    UID			   0x100039CE 0xEAFA3181
    VENDORID	  	  0
    TARGETTYPE		exe
    EPOCSTACKSIZE	 0x5000
    
    SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\ecom
    USERINCLUDE	   ..\inc ..\data
    
    SOURCEPATH		..\data
    START RESOURCE	Dice_Thrower.rss
    HEADER
    TARGETPATH resource\apps
    END //RESOURCE
    
    START RESOURCE	Dice_Thrower_reg.rss
    TARGETPATH 	  \private\10003a3f\apps
    END //RESOURCE
    
    LIBRARY			euser.lib apparc.lib cone.lib eikcore.lib avkon.lib
    LIBRARY			commonengine.lib efsrv.lib estor.lib eikcoctl.lib eikdlg.lib 
    LIBRARY			eikctl.lib bafl.lib fbscli.lib aknnotify.lib aknicon.lib
    LIBRARY			etext.lib gdi.lib egul.lib insock.lib
    LIBRARY			ecom.lib InetProtUtil.lib http.lib esock.lib
    
    LANG 				01
    
    START BITMAP	Dice_Thrower.mbm
    HEADER
    TARGETPATH		\resource\apps
    SOURCEPATH		..\gfx
    SOURCE	c12,1	list_icon.bmp list_icon_mask.bmp
    END
    
    SOURCEPATH		..\src
    
    #ifdef ENABLE_ABIV2_MODE
    DEBUGGABLE_UDEBONLY
    #endif
    
    SOURCE Dice_ThrowerContainer.cpp Dice_ThrowerContainerView.cpp Dice_ThrowerAppUi.cpp Dice_ThrowerApplication.cpp Dice_ThrowerDocument.cpp Throw.cpp ThrowValues.cpp
    Last edited by nikan624; 2010-07-06 at 20:09. Reason: Found solution

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Undefined symbol error

    Note that RArray is ideal for storing value types, but it can not free/delete pointers, so you would have to delete the items one by one in order to avoid memory leaks.
    RPointerArray is designed to store pointers, if you invoke its ResetAndDestroy method, it deletes the pointers, and cleans the array (if you are owning the items somewhere else, it also support the Reset/Close methods just like RArray)
    RPointerArray<CThrow> would be the array in that case (RPointerArray 'knows' that it is storing pointers).

    Coding style: R/Pointer/Array stores its content on the heap, and generally in C++ is it considered to be uncertain/dangerous (shallow copy vs. deep copy problem) to pass such objects by value. Returning a pointer, or which is better, a reference would 'look' safer.

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    2

    Re: Undefined symbol error

    ok
    thanks
    had not thought of that

Similar Threads

  1. Undefined Symbol error
    By neverma in forum Symbian
    Replies: 10
    Last Post: 2010-03-24, 11:14
  2. Undefined symbol error
    By amjedab in forum VoIP
    Replies: 6
    Last Post: 2009-11-11, 10:12
  3. Undefined Symbol error.
    By neverma in forum Symbian
    Replies: 9
    Last Post: 2009-10-26, 09:47
  4. Undefined symbol error
    By se3eedy_online in forum Symbian
    Replies: 7
    Last Post: 2008-03-19, 13:38

Posting Permissions

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