×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    94

    compilation error: identifier redeclared

    Hi ,

    while compiling my project got the following error .I hope I ve rightly included the required .h files in right place but getting such errors.Will u pls tell me what are the reasons for such errors.

    Thanks and Regards,
    --Netra


    ====================================
    Warning : tool exit status == 1

    Error : identifier 'CRSRadioMainView::NewL()' redeclared
    RSRADIOAPPVIEWMAIN.CPP line 26

    Error : was declared as: 'CRSRadioMainView * ()'
    RSRADIOAPPVIEWMAIN.CPP line 26

    Error : now declared as: 'CRSRadioMainView * (const TRect &)'
    RSRADIOAPPVIEWMAIN.CPP line 26

    Error : function call 'NewLC({lval} const TRect)' does not match
    RSRADIOAPPVIEWMAIN.CPP line 27

    Error : 'CRSRadioMainView::NewLC()' (static)
    RSRADIOAPPVIEWMAIN.CPP line 27

    Error : identifier 'CRSRadioMainView::NewLC()' redeclared
    RSRADIOAPPVIEWMAIN.CPP line 33

    Error : was declared as: 'CRSRadioMainView * ()'
    RSRADIOAPPVIEWMAIN.CPP line 33

    Error : now declared as: 'CRSRadioMainView * (const TRect &)'
    RSRADIOAPPVIEWMAIN.CPP line 33

    Error : function call '[CRSRadioMainView].ConstructL({lval} const TRect)' does not match
    RSRADIOAPPVIEWMAIN.CPP line 36

    Error : 'CRSRadioMainView::ConstructL()' (non-static)
    RSRADIOAPPVIEWMAIN.CPP line 36

    Error : object 'CRSRadioMainView::CRSRadioMainView()' redefined
    RSRADIOAPPVIEWMAIN.CPP line 41

    Error : function call 'NewL(TRect *, int)' does not match
    RSRADIOAPPVIEWMAIN.CPP line 69

    Error : 'CRSRadioMainView::NewL(const TRect &)' (static)
    RSRADIOAPPVIEWMAIN.CPP line 69

    Error : undefined identifier 'SetMopParent'
    RSRADIOAPPVIEWMAIN.CPP line 70

    Error : function call '[CAknViewAppUi].AddToStackL({lval} CRSRadioMainView, {lval} CRSRadioMainView *)' does not match
    RSRADIOAPPVIEWMAIN.CPP line 71

    Error : 'CCoeAppUi::AddToStackL(CCoeControl *, int, int)' (non-static)
    RSRADIOAPPVIEWMAIN.CPP line 71

    Error : 'CCoeAppUi::AddToStackL(const MCoeView &, CCoeControl *, int, int)' (non-static)
    RSRADIOAPPVIEWMAIN.CPP line 71

    Error : function call '[CAknViewAppUi].RemoveFromStack({lval} CRSRadioMainView *)' does not match
    RSRADIOAPPVIEWMAIN.CPP line 83

    Error : 'CCoeAppUi::RemoveFromStack(CCoeControl *)' (non-static)
    RSRADIOAPPVIEWMAIN.CPP line 83

    Error : undefined identifier 'R_RADIO_MAINVIEW'
    RSRADIOAPPVIEWMAIN.CPP line 113

    Error : object 'CRSRadioMainView::HandleCommandL(int)' redefined
    RSRADIOAPPVIEWMAIN.CPP line 118

    Error : declaration syntax error
    RSRADIOAPPVIEWMAIN.CPP line 189

    Error : Compile failed

    Could not find or load the file "RSRADIOMMAINCONTAINER.cpp" for target "WINSCW UDEB" for project "RSRADIO.mcp".

    Warning : tool exit status == 1

    Error : identifier 'CRSRadioStartedView::NewL()' redeclared
    RSRADIOAPPVIEWSTARTED.CPP line 23

    Error : was declared as: 'CRSRadioStartedView * ()'
    RSRADIOAPPVIEWSTARTED.CPP line 23

    Error : now declared as: 'CRSRadioStartedView * (const TRect &)'
    RSRADIOAPPVIEWSTARTED.CPP line 23

    Error : function call 'NewLC({lval} const TRect)' does not match
    RSRADIOAPPVIEWSTARTED.CPP line 24

    Error : 'CRSRadioStartedView::NewLC()' (static)
    RSRADIOAPPVIEWSTARTED.CPP line 24

    Error : identifier 'CRSRadioStartedView::NewLC()' redeclared
    RSRADIOAPPVIEWSTARTED.CPP line 30

    Error : was declared as: 'CRSRadioStartedView * ()'
    RSRADIOAPPVIEWSTARTED.CPP line 30

    Error : now declared as: 'CRSRadioStartedView * (const TRect &)'
    RSRADIOAPPVIEWSTARTED.CPP line 30

    Error : function call '[CRSRadioStartedView].ConstructL({lval} const TRect)' does not match
    RSRADIOAPPVIEWSTARTED.CPP line 33

    Error : 'CRSRadioStartedView::ConstructL()' (non-static)
    RSRADIOAPPVIEWSTARTED.CPP line 33

    Error : object 'CRSRadioStartedView::CRSRadioStartedView()' redefined
    RSRADIOAPPVIEWSTARTED.CPP line 38



    Error : Compile failed

  2. #2
    Regular Contributor
    Join Date
    Nov 2006
    Location
    India
    Posts
    170

    Re: compilation error: identifier redeclared

    Hello,

    Check whether you have used #ifndef #define #endif macros in .h file. If not add them may be due to this you are getting redeclaration error.(i.e. same .h file has been included twice into your source code)

    regards,
    bnvaikos

  3. #3
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    94

    Re: compilation error: identifier redeclared

    Yes,

    The problem was in macro.

    Thanks,
    -NN

Similar Threads

  1. Carbide.c++ v1.1 compilation hanging
    By Sorcery-ltd in forum Tools and SDK Feedback (Closed)
    Replies: 0
    Last Post: 2006-12-04, 12:52
  2. Cimpop3Getmail Compilation Error
    By mubx2000 in forum Symbian Networking & Messaging (Closed)
    Replies: 12
    Last Post: 2006-07-08, 12:28
  3. [.NET] No C++ compilation message
    By Deidril in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2005-06-03, 11:11
  4. error during S60 compilation
    By kmsoomro in forum Symbian
    Replies: 3
    Last Post: 2004-12-31, 16:16
  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
  •  
×