Since the Series 60 application can be created from a command prompt or IDE, we also detail these two methods. First, we start by using the C ++ compiler provided by IDE to build a simulator (x86 Instruction Set) program running on a PC. We also use debugging settings, so we can use the symbolic debugging information and memory vulnerability check (dynamically check whether the allocated memory on the stack is correctly released ).
Create a program from the command line
Open the command prompt and change the current path to the drive/folder containing the Series 60 SDK. Navigate to a folder that contains the project definition (helloworld. MMP) and component description (BLD. inf) files-for example:
/Symbian/series602_0/emccsoft/helloworld/group
The above code is used for Series 60 2. x projects, or
/Symbian/6.1/series60/emccsoft/helloworld/group
The above code is used for Series 60 1. x projects. And enter:
Bldmake bldfiles
The command is completed in a second or two, and there is no visual output. It uses the bld. inf and helloworld. MMP files to generate a new file, abld. bat. This command file is generally generated as needed. Unlike the bld. inf and. MMP files, abld. Bat cannot be migrated between different IDES and cannot be modified manually.
Enter the following command to compile and link the project:
Abld build wins udeb |
-For visual C ++ |
Abld build winsb udeb |
-Borland C ++ |
Abld build winscw udeb |
-Codewarrior |
The abld command will create this project (in other words, compile and link) for the Series 60 simulator (wins, winscw, or winsb) and include the debugging information in the binary executable file.
SlaveIDECreate a program
Project (for example, our exampleHelloworldApplications) are usually created and run in an IDE, so we need to use the bld. inf and helloworld. MMP file to create a project file for a specific IDE. For visual C ++, this work must be completed on the command line using the tool provided by Symbian. This is optional for borland and codewarrior because both ides can import bld. inf or. MMP files to create ide project files.
When we start working from the command prompt, if the abld. BAT file does not exist, it is necessary to establish it; if the. MMP file or the bld. inf file changes, it also needs to be re-created. Enter the following content in the command prompt to create the abld command file:
Bldmake bldfiles
Use MicrosoftVisual c ++Create a program
Open a command prompt and navigateHelloworldThe drive/project folder of the project, and enter:
Abld makefile vc6
This will create projects and workspace files (helloworld. DSP and. DSW files) suitable for Microsoft Visual C ++ ). They will be in the/epoc32/build subfolder structure; their complete Path depends on the SDK location, for example:
/Epoc32/build/emccsoft/helloworld/wins
By opening a workspace file (helloworld. DSW) in Visual C ++, You can compile or link the application by pressingF7Or use ide menu optionsBuild | build helloworld. app.
UseBorland C ++ ide Builder 6Create a program
If you use Borland C ++ Builder 6 mobile edition (based on Borland C ++ Builder 6 Personal Edition and added mobile plug-ins), you can simplyHelloworldThe bld. inf file of the Project is imported into IDE. UseFile | new | OtherMenu options, and then selectMobile(Mobile)Data PageImport Mobile Application(Import mobile applications). Browse the location of the component description file (BLD. inf) and open it.
UseCTRL + F9Or in the menuProject | makeCreate a program. To establish and runF9Or in the menuRun | run. Note:F9OrRun | runThis will cause the project to be re-created every time. If you only run on the simulator, useTools | mobile build tools | run emulator(Tools|Mobile creation tool|Running Simulator). IDE may prompt you to save a large number of project-related files, such as Borland Project (. BPR) and Borland Project Team (. BPG) files. These files are stored in the same location as the bld. inf file folder.
We can also execute independentAbldCommand and run other SDK tools (for exampleTools | mobile build toolsOn the menuAifbuilderAndSISAR).
UseBorland C ++ builderxCreate a program
When using any commercial C ++ builderx product, you can simplyHelloworldThe bld. inf file of the Project is imported into IDE.
UseFile | newAnd clickMobile C ++Data Page. SelectImport Symbian C ++ Project(ImportSymbian C ++Project). Select the correct Series 60 SDK from the drop-down list to view the location of the bld. inf file of the project. ClickNextData Page, give the project a name, and clickFinishData page, the project will open. PressCTRL + F9OrProject | make projectSelect. PressF9Or selectRun | run projectOr use a toolbarMake and runRun the project.
UseCodewarrior ideCreate a program
If you are using metrowerks codewarrior for Symbian (personal version 2.5, other versions may be slightly different), you can simply use the IDE menu optionsFile | import project from. MMP File(File|Slave. MMPFile Import Project)To import the helloworld. MMP file.
This will run the project conversion wizard. Select the SDK used by the project, select (or browse) The. MMP file, and select a winscw platform (or leave it empty ). The default value of build variable is udeb. UseF7Or in the menuProject | makeCreate a project.
The codewarrior project files (. CMP,. XML,. Resources, and. Pref files) are automatically created in the directory where the helloworld. MMP file is located.
You can also create a codewarrior ide project through the command line. Run the bldmake bldfiles described above, and then it generates a codewarrior ide project:
Abld makefile cw_ide
This will create a project file helloworld. XML that can be imported in the directory:
/Epoc32/build/emccsoft/helloworld/winscw
Now you can use codewarrior to import this file and generate a local project (. MCP) file. SelectFile | import Project (import Project)Menu option, select the helloworld. xml file, and select a name for the project (for exampleHelloworld). Codewarrior will generate and load the project. You can use normal ide commands to create, run, debug, and perform other operations.
Prepared by Tao gang
Time: 2004-12-07
Source: Skynet