Symbian OS Development Manual (1) Introduction

Source: Internet
Author: User
Symbian OS Development Manual (1) Introduction
Symbian OS is the most widely used smart phone operating system. Many Nokia, Panasonic, Siemens, and Sony Ericsson mobile phones are based on this system. Unfortunately, there is very little information about Symbian OS development in China. Therefore, I plan to write a basic tutorial based on my (simple) experience to help more people understand Symbian OS.
Speaking of Symbian OS, many people may think of Nokia series 60, 80, and so on. Every mobile phone manufacturer in the Symbian alliance will add their own things on pure Symbian OS. Series 60 is a very popular software development kit of Nokia. It is based on 7650,365 0, N-Gage, and so on. All examples used here can run in Series 60. however, the concept I am talking about here is purely Symbian OS rather than Series 60. The advantage is that with this foundation, we can develop for any mobile phone that uses Symbian OS, it is not limited to some special APIs such as Series 60. This allows your development results to run on more devices.
So first we need Series 60 SDK, download in http://www.forum.nokia.com/main/0,6566,034-4,00.html, install SDK, detailed steps I will not describe here. If you have any questions, you can ask me here.
After installation, test whether the basic path is set. Open a command line window and enter the EPOC. If you see the simulator running, it indicates that it has been installed. If you do not have any, provide an error message when asking a question.
With the SDK, we can start development! However, the development environment is very important. Any Symbian OS program involves multiple files. We recommend that you use metrowork codewarrior for symbain. However, considering the popularity of vc6, here I use VISUAL C ++ 6.0. you can also use VC.. net, but currently the Chinese SDK does not support vc7. You need to download the English version. You need to use vc7 when the command line appears vc6 in the future.
Before explaining our first hello World Program, let's briefly talk about the file structure of the Symbian OS project. We need to create four types of files in total:
Bld. inf configuration file
*. MMP 'engineering File
*. Cpp source code file
*. H header file
In our hello World project, bld. inf is as follows:
Prj_matrix files
Helloworld. MMP
There are only two simple lines. This configuration file will compile the project: helloworld. MMP. helloworld. MPS is a little more complex. You just need to know which source files, header files, and Lib files are included in the definition project.
Basic helloworld example C:/symbian7.0s/series60_v21_c/examples/basics/helloworld. If your installation path is different, you need to change it accordingly. Because it is very simple, this is probably the only project in all examples without header files. Helloworld. cpp is as follows:
# Include "commonframework. H"
Local_c void doexamplel ()
{
_ Partition (khelloworldtext, "Hello world! ");
Console-> printf (khelloworldtext );
}
Before we can explain descriptor, you only need to know _ Hello world! "This normal string is converted to the string format of Symbian OS and stored in the variable khelloworldtext. Console-> printf (...) is to print this string to the command line.
Now we need to compile this project, enter examples/basics/helloworld in the command line, enter bldmake bldfiles, and then abld makefile vc6, which is the basic step for creating the VC project file. Then open Visual Studio and open the workspace in C: /Symbian/7.0 S/series60_v21_c/epoc32/build/Symbian/7.0 S/series60_v21_c/examples/basics/helloworld/wins.
After analyzing this huge path, you will find that it is actually divided into four sections:
1. C:/symbian7.0s/series60_v21_c/epoc32 is where the global environment variable % epocroot % is located. We will replace it with % epocroot % when talking about this path.
2. The build directory stores the project files generated by abld.
3. Symbian/7.0 S/series60_v21_c/examples/basics/helloworld is the directory where your project is located.
4. Helloworld/wins is the helloworld project, a Windows simulator. If you compile it for a mobile phone, it will be helloworld/thumb.
Then, a dialog box is displayed asking for executable files. Enter % epocroot %/release/wins/udeb/epoc.exe and you will see the familiar "Hello World" on the s60 simulator!
Write it here first. I hope these words will be of some use to everyone. Next time, I will introduce the basic types and code specifications of Symbian OS.
[This blogger cannot handle the backslash, so I have to use '/' instead.]
FAQs:
1. Various compilation problems
Make sure you have installed:
Visual Studio 6, active Perl, Series 60 SDK
We recommend that you put the VC, Series 60, and code you will write in the same partition to save some trouble in settings.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.