problem when compiling

Login to reply to this topic.
Mon, 2008-02-04 14:32
Joined: 2006-07-21
Forum posts: 151

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??


#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 Sad

Best regard

Silvia


Mon, 2008-02-04 14:57
Joined: 2003-12-05
Forum posts: 588
Re: problem when compiling

Try using #ifndef EKA2 instead.

Mon, 2008-02-04 15:05
Joined: 2006-07-21
Forum posts: 151
Re: problem when compiling

Thanks, but there is same problem Sad
If i write this code work, but if i complide whit 2nd not compiled Sad


#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

best regard
Silvia

Mon, 2008-02-04 15:26
Joined: 2003-12-05
Forum posts: 588
Re: problem when compiling

Well, #ifndef EKA2 works for me. Have you noticed that it is ifndef, not ifdef? EKA2 is defined in v9 builds (also in UIQ), and not in pre v9.

Mon, 2008-02-04 15:30
Joined: 2006-07-21
Forum posts: 151
Re: problem when compiling

Hyi,
I see that my application compiled if i use

#ifdef __SERIES60_3X__

What difference there are with
#ifdef __SERIES60_30__

Thanks
Silvia

Mon, 2008-02-04 16:22
Joined: 2004-11-29
Forum posts: 1142
Re: problem when compiling

You should use #ifdef EKA2 if you want to do it "correctly", since this is what decides which code you need.
(EKA2 means the new kernel, and that is what decides what "startup" code you need, and not really the S60 sdk version, even though all above 3.0 also is EKA2)

But I guess it doesn't matter if you only want it to compile under S60 SDKs...

Isn't the difference between __SERIES60_3X__ and __SERIES60_30__ pretty obvious? (assuming it is used as the name suggests)
30 should mean 3.0, and only 3.0, and 3X should mean also 3.1 and 3.2 (FP1 and FP2)

Mon, 2008-02-04 17:02
Joined: 2006-07-21
Forum posts: 151
Re: problem when compiling

So, I know now.
Many thanks for all
Silvia

  • Login to reply to this topic.