一、Helloword示例:
首先检查SDK是否能够正常运行: 进入一个DOS界面 输入"NMAKE",如果得到Microsoft Error message U1064的错误提示,检查你的路径配置是否正确。如果提示NMAKE is not a recognised command,需要运行路径为C:\Program Files\Microsoft Visual Studio\VC98\Bin 下的VCVARS32.BAT脚本。
在DOS下进入HellowWorld,路径为C:\Symbian\6.1\Series60\Epoc32Ex\Basics\HelloWorld 这个目录下包含3个文件: bid.inf helloworld.mmp helloworld.c
Bid.inf文件是主要的Project文件

HelloWorld.mmp是一个project makefile.包括所有源文件和库的列表:

HelloWord.cpp是C++代码

CommonFramework.h是一个头文件,The CommonFramework.h set up a basic console environment and calls a doExampleL() primitive: this is an extremely useful file to begin playing Symbian C++ without the burden of NS60 specific code (you can also read A simple text console if you want to know more about this console).
二、命令行编码:
在DOS环境下输入 bldmake bldfiles.将会在Project目录下创建一个ABLD.BAT文件,这是编译程序的入口文件。
输入abld build wins udeb进行编译。编辑后的结果存在C:\Symbian\6.1\Series60\Epoc32\Release\wins\UDEB目录下。输入Helloworld就可以在epoc模拟器下运行"Hello world"程序了。
三、用Visual C++ 你也可以用C++编译和执行应用程序。 回到C:\Symbian\6.1\Series60\Epoc32Ex\Basics\HelloWorld 用命令生成一个Visual C++ workspace:abld makefile vc6 在下面的目录可以找到C:\Symbian\ 6.1\ Series60\ Epoc32\ BUILD\ SYMBIAN\ 6.1\ SERIES60\ EPOC32EX\ BASICS\ HELLOWORLD\ HELLOWORLD\ WINS 打开这个workspace并重新编译,用CTRL-F5开始运行。
四、目标编译 现在需要在你的移动设备上运行这个程序,回到DOS下,进入C:\Symbian\6.1\Series60\Epoc32Ex\Basics\HelloWorld 用abld命令编译abld build thumb urel
|