×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    2

    Problem: Error: undefined identifier 'TDllReason'

    Run with CodeWarror return error:
    Error: undefined identifier 'TDllReason'
    in code

    GLDEF_C TInt E32Dll(TDllReason)
    {
    return KErrNone;
    }
    why?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    61
    Have you included e32std.h?

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    2
    No... in what file?
    (This is a Example HelloWorld)
    in HelloWorld.mmp or in HelloWorld_Main.cpp

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    3

    Re: Problem: Error: undefined identifier 'TDllReason'

    Hah. This is indeed funny! Install CodeWarrior. Install S60 3rd edition. Create new HelloWorld project from File->New... Try to compile and get an error. It seems nothing has changed since I last tried a Symbian SDK :-)

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    1

    Thumbs down Re: Problem: Error: undefined identifier 'TDllReason'


    Hmm. i meet the same problem. do we need back to old version SDK. i cannot do any debug work now....

  6. #6
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: Problem: Error: undefined identifier 'TDllReason'

    Which S60 SDK version are you using?
    S60 3.0 doesn't support TDllReason any longer. Look at the document from Forum Nokia how to port to S60 3.0, http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html.

    Antony

  7. #7
    Registered User
    Join Date
    Feb 2005
    Posts
    3

    Re: Problem: Error: undefined identifier 'TDllReason'

    Ok, so it's just the HelloWorld example that has not been updated to the 3rd edition SDK. Really stupid mistake though, as this is the code you get when you create a new S60 project from File -> New.

    Another problem is also that whatever you build or try to compile never turns up in the emulator.

    Anyway, I was advised by friends that know better to use the 2nd edition SDK that is specifically for CodeWarrior. As long as compiling HelloWorld fails, you can only guess what other problems will turn up with the new SDK later. Since I don't absolutely need it, no point in wasting my time on things like that.

  8. #8
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: Problem: Error: undefined identifier 'TDllReason'

    Actually CodeWarrior 3.1 supports 3rd Edition.
    Anyway, it's up to you if you want to switch back to 2nd Edition.
    However, make sure that you don't target 3rd devices, like N71, N80, N91, N92 because there is BC break between 2nd and 3rd Edition.

    Antony

  9. #9
    Nokia Developer Expert
    Join Date
    Mar 2004
    Posts
    98

    Re: Problem: Error: undefined identifier 'TDllReason'

    Instead of selecting File-New to create the project, try choosing Import Project From .MMP file from the File menu. You can then select a HelloWorld project that will get created properly without the TDLLReason reference.

    Also, this problem has been fixed for the upcoming Carbide.c++ release, so it won't be a problem then.

  10. #10
    Registered User
    Join Date
    Feb 2005
    Posts
    3

    Re: Problem: Error: undefined identifier 'TDllReason'

    Quote Originally Posted by hingo
    Another problem is also that whatever you build or try to compile never turns up in the emulator.
    Actually, it does, I just didn't know to look in the right place. When debugging on S60 3.0, you find your compiled app under "Installat."

    Just thought I should add this in case someone else was reading the thread.

  11. #11
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    79

    Re: Problem: Error: undefined identifier 'TDllReason'

    Just remove the function, it will compile.

    Quote Originally Posted by ice_nadin
    Run with CodeWarror return error:
    Error: undefined identifier 'TDllReason'
    in code

    GLDEF_C TInt E32Dll(TDllReason)
    {
    return KErrNone;
    }
    why?

  12. #12
    Registered User
    Join Date
    May 2008
    Posts
    29

    Re: Problem: Error: undefined identifier 'TDllReason'

    hello,
    Symbian SDKs doesn't TDllReason any more istead of that change that to

    GLDEF_C TInt E32Main()
    {
    return EikStart::RunApplication( NewApplication );
    }

    and also include eikstart.h file with that

    Amrish

  13. #13
    Registered User
    Join Date
    Aug 2007
    Posts
    19

    Re: Problem: Error: undefined identifier 'TDllReason'

    I'm getting error in the following line
    return EikStart::RunApplication( NewApplication );
    as undefined identifier 'NewApplication'...
    /*
    ============================================================================
    Name : ListDemo.cpp
    Author : Anindya
    Version :
    Copyright : Your copyright notice
    Description : CListDemo implementation
    ============================================================================
    */

    #include "ListDemo.h"
    #include <eikstart.h>
    #include "ListDemoDocument.h"
    // ---------------------------------------------------------
    // E32Dll()
    // Entry point function for EPOC Apps
    // Returns: KErrNone: No error
    // ---------------------------------------------------------
    //
    GLDEF_C TInt E32Main( ) {
    return EikStart::RunApplication( NewApplication );
    }

    // ================= OTHER EXPORTED FUNCTIONS ==============
    //
    // ---------------------------------------------------------
    // NewApplication()
    // Constructs ListDemo
    // Returns: CApaDocument*: created application object
    // ---------------------------------------------------------
    //
    LOCAL_C CApaApplication* NewApplication() {
    return new ListDemo;
    }

    TUid ListDemo::AppDllUid() const
    {
    return KUidListDemo;
    }

    // ---------------------------------------------------------
    // ListDemo::CreateDocumentL()
    // Creates ListDemo object
    // ---------------------------------------------------------
    //
    CApaDocument* ListDemo::CreateDocumentL() {
    return ListDemoDocument::NewL( *this );
    }

  14. #14
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Problem: Error: undefined identifier 'TDllReason'


  15. #15
    Registered User
    Join Date
    Nov 2008
    Posts
    16

    Re: Problem: Error: undefined identifier 'TDllReason'

    Try to define NewApplication() method first, before call RunApplication()
    Code:
    #include <eikstart.h>
    #include "se.h"
    
    EXPORT_C CApaApplication* NewApplication()
       {
         return (new CSimpleExApplication);
       }
    
    GLDEF_C TInt E32Main()
    	{
    	return EikStart::RunApplication(NewApplication);
    	}
    I'm new, hope this help

Posting Permissions

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