Symbian开发简介

Symbian开发简介
--简单介绍Symbian上的应用软件开发过程

篇首语:Symbian出来已经很久了,其上的应用软件开发应该很成熟了。。。

SymbianOS
1。Symbian上的应用软件开发主要用Symbian C++,当然Open C/C++,JAVA(J2ME),Web Runtime (WRT) widgets也行。 IDE用 Carbide.c++(对Symbian C++来说,其它语言用相应的IDE)。
2。在Symbian开发首先需要一SDK(Software Development Kit),如S60等。

GUI 用户界面平台
S60 (Nokia,如下面的例子)
UIQ (Sony Ericsson )
MOAP (NTT docomo)

HelloWorld
贴HelloSymbian.cpp的代码在下面:
//HelloSymbian.cpp
/*
============================================================================
Name : HelloSymbian.cpp
Author :
Copyright : Your copyright notice
Description : Exe source file
============================================================================
*/

// Include Files

#include "HelloSymbian.h"
#include <e32base.h>
#include <e32std.h>
#include <e32cons.h> // Console

// Constants

_LIT(KTextConsoleTitle, "Console");
_LIT(KTextFailed, " failed, leave code = %d");
_LIT(KTextPressAnyKey, " [press any key]/n");

// Global Variables

LOCAL_D CConsoleBase* console; // write all messages to this


// Local Functions

LOCAL_C void MainL()
{
//
// add your program code here, example code below
//
console->Write(_L("Hello, world!/n"));
}

LOCAL_C void DoStartL()
{
// Create active scheduler (to run active objects)
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
CleanupStack::PushL(scheduler);
CActiveScheduler::Install(scheduler);

MainL();

// Delete active scheduler
CleanupStack::PopAndDestroy(scheduler);
}

// Global Functions

GLDEF_C TInt E32Main()
{
// Create cleanup stack
__UHEAP_MARK;
CTrapCleanup* cleanup = CTrapCleanup::New();

// Create output console
TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
if (createError)
return createError;

// Run application code inside TRAP harness, wait keypress when terminated
TRAPD(mainError, DoStartL());
if (mainError)
console->Printf(KTextFailed, mainError);
console->Printf(KTextPressAnyKey);
console->Getch();

delete console;
delete cleanup;
__UHEAP_MARKEND;
return KErrNone;
}

资源:
Forum Nokia: http://www.forum.nokia.com/
上面关于Symbian开发的资料一应俱全啦。。。Symbian高手也蛮多的。。。
入门级资料:右边 Resources-->Documentation
论坛:Communities-->Discussion Boards

下篇:Windows Mobile开发简介。。。

你可能感兴趣的:(Symbian)