×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    252

    problem when compiling

    Hi,
    i need to port one application to series60 2nd to serie60 3rd, but i have problem with #ifdef.

    This code give this error:
    "error: `TDllReason' was not declared in this scope"

    why??

    Code:
    #ifdef __SERIES60_30__
    // ---------------------------------------------------------
    // E32Main()
    // Entry point function for EPOC Application
    // Returns: EikStart::RunApplication: NewApplication
    // ---------------------------------------------------------
    //
    GLDEF_C TInt E32Main()
    {
    	return EikStart::RunApplication( NewApplication );
    }
    
    
    LOCAL_C CApaApplication* NewApplication()
    {
    	return  (new CApplication);
    }
    
    #else
    
    // ---------------------------------------------------------------------------
    // NewApplication() (2nd Edition) 
    //
    // Constructs CIAPConnectApp
    // Returns: created application object
    // ---------------------------------------------------------------------------
    //
    EXPORT_C CApaApplication* NewApplication()
        {
        return new CApplication;
        }
    // -----------------------------------------------------------------------------
    //  Entry point function for Symbian Apps (2nd Edition )
    // -----------------------------------------------------------------------------
    GLDEF_C TInt E32Dll( TDllReason )
    	{
    	return KErrNone;
    	}
    // End of File  
    #endif
    I follow manual to porting application but this not compiled

    Best regard

    Silvia

  2. #2
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: problem when compiling

    Hi silviuccia

    TDLLReason not in s60 3rd sdk, u use following for 3 rd sdk.

    #include <eikstart.h>

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


    this is for 3rd SDK.

    with best regards
    Amit

  3. #3
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    252

    Re: problem when compiling

    Quote Originally Posted by aamitgupta View Post
    Hi silviuccia

    TDLLReason not in s60 3rd sdk, u use following for 3 rd sdk.

    #include <eikstart.h>

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


    this is for 3rd SDK.

    with best regards
    Amit

    thanks,
    but I insert this include (I not insert include inside post code) and this section of your code.
    I need to Keep compatibility with series60 2nd, and for this I insert #ifdef __SERIES60_30__, but not work

  4. #4
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Thumbs up Re: problem when compiling

    Ya i know, u don't understand what m i saying, u write the following

    EXPORT_C CApaApplication* NewApplication()
    {
    return new CApplication;
    }

    #ifdef __SERIES60_30__

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

    #else

    // DLL entry point, return that everything is ok
    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return KErrNone;
    }

    #endif



    i think it will work. Try

    With best Regards
    Amit

  5. #5
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    252

    Re: problem when compiling

    Quote Originally Posted by aamitgupta View Post
    Ya i know, u don't understand what m i saying, u write the following

    EXPORT_C CApaApplication* NewApplication()
    {
    return new CApplication;
    }

    #ifdef __SERIES60_30__

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

    #else

    // DLL entry point, return that everything is ok
    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return KErrNone;
    }

    #endif



    i think it will work. Try

    With best Regards
    Amit

    Sorry, but i try your code but not work and give same error
    Look, this error disappear if a write this:
    Code:
    #ifdef __SERIES60_30__
    // ---------------------------------------------------------
    // E32Main()
    // Entry point function for EPOC Application
    // Returns: EikStart::RunApplication: NewApplication
    // ---------------------------------------------------------
    //
    GLDEF_C TInt E32Main()
    {
    	return EikStart::RunApplication( NewApplication );
    }
    
    
    LOCAL_C CApaApplication* NewApplication()
    {
    	return  (new CApplication);
    }
    
    #endif
    #ifdef __SERIES60_20__
    
    // ---------------------------------------------------------------------------
    // NewApplication() (2nd Edition) 
    //
    // Constructs CIAPConnectApp
    // Returns: created application object
    // ---------------------------------------------------------------------------
    //
    EXPORT_C CApaApplication* NewApplication()
        {
        return new CApplication;
        }
    // -----------------------------------------------------------------------------
    //  Entry point function for Symbian Apps (2nd Edition )
    // -----------------------------------------------------------------------------
    GLDEF_C TInt E32Dll( TDllReason )
    	{
    	return KErrNone;
    	}
    // End of File  
    #endif
    but this not compiled with 2nd!!!
    it is a stupid error, but i don't know solution
    best regard
    Silvia

  6. #6
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Thumbs up Re: problem when compiling

    Hi this #ifdef __SERIES60_20__ keywords not in 2nd SDK, ok, so please write as it is i told u,
    LOCAL_C CApaApplication* NewApplication()
    {
    return new CMyViewApp;
    }
    #ifdef __SERIES60_30__
    GLDEF_C TInt E32Main()
    {
    return EikStart::RunApplication( NewApplication );
    }
    #else

    // DLL entry point, return that everything is ok
    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return KErrNone;
    }

    #endif

    it is work for me, ok

    With best Regards
    Amit

  7. #7
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    252

    Re: problem when compiling

    Quote Originally Posted by aamitgupta View Post
    Hi this #ifdef __SERIES60_20__ keywords not in 2nd SDK, ok, so please write as it is i told u,
    LOCAL_C CApaApplication* NewApplication()
    {
    return new CMyViewApp;
    }
    #ifdef __SERIES60_30__
    GLDEF_C TInt E32Main()
    {
    return EikStart::RunApplication( NewApplication );
    }
    #else

    // DLL entry point, return that everything is ok
    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return KErrNone;
    }

    #endif

    it is work for me, ok

    With best Regards
    Amit


    Work, but if I compiled on shell, not if I compiled with carbide...
    One question:
    What diference there is if I white
    #ifdef __SERIES60_30__
    or
    #ifdef __SERIES60_3X__

    Thanks for all
    Silvia

  8. #8
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,559

    Re: problem when compiling

    Hi Silvia,

    This works for me :

    Code:
    #ifdef __SERIES60_30__
    
    #include <eikstart.h>
    
    #endif
    
    
    #ifdef __SERIES60_30__
    
    GLDEF_C TInt E32Main()
    
          {
    
          return EikStart::RunApplication( NewApplication );
    
          }
    
    # else
    
    GLDEF_C TInt E32Dll( TDllReason )
    
        {
    
        return KErrNone;
    
        }
    
    #endif
    And its pretty much what Amit has been trying to tell you too.

  9. #9
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    252

    Re: problem when compiling

    Quote Originally Posted by Symbian_Neil View Post
    Hi Silvia,

    This works for me :

    Code:
    #ifdef __SERIES60_30__
    
    #include <eikstart.h>
    
    #endif
    
    
    #ifdef __SERIES60_30__
    
    GLDEF_C TInt E32Main()
    
          {
    
          return EikStart::RunApplication( NewApplication );
    
          }
    
    # else
    
    GLDEF_C TInt E32Dll( TDllReason )
    
        {
    
        return KErrNone;
    
        }
    
    #endif
    And its pretty much what Amit has been trying to tell you too.
    So, now work
    Bye and thanks for all
    Silvia

Similar Threads

  1. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  2. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  3. CodeWarrior EPOCROOT problem
    By splinecl in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-10-01, 09:47
  4. problem compiling java class
    By Kaysc in forum Mobile Java General
    Replies: 2
    Last Post: 2004-07-12, 09:49
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

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