×
Namespaces

Variants
Actions

How to create project in Carbide.c++ for the s60

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: rahulvala (26 Jan 2009)
Last edited: hamishwillee (26 Jul 2012)

Warning.pngThis article does not meet the wiki quality standards: Please make it more useful by adding links or additional information as discussed in the quality standards. When you have done so you can delete the {{NeedsMoreWork}} template from the article to remove this warning.


see comments page


Contents

Creating a project

Carbide.c++ provides a number of different ways in which to get started with application development.

Creating a new project

Use the New Project Wizard to create a new C++ application for S60. Creating a new project with the New Project Wizard is a convenient way to get started with S60 application development. The wizard provides various different project templates from which to choose from and guides you step by step in creating a new project based on the selected template. Once you have selected the appropriate template and entered the needed project information in the dialogs, the wizard creates all the needed project files and directories, enabling you to start working on it in the Carbide.c++ workbench. Creating a New project with Carbide Can be seen as in image below:

Editcarbide1.jpg

After Choosing the option as shown in image above("Symbian OS c++ project"), a window will appear, asking to Choose the type of project user want to make.The window appearing will be:

CarbideCreateNew.png

Importing a project

The Import Project Wizard allows you to import Symbian OS projects. You may wish to use this approach if you have existing Symbian OS projects and now wish to move to development in Eclipse. The wizard allows you to import both component description file (bld.inf) and project definition file (.mmp) based projects. To Import an existing project from directory, Choose the option as shown below:

EditCarbideImport.jpg

After Choosing the option as shown in image above("Import"), a window will appear, asking to Import the bld.inf file of an existing project.The window appearing will be:

EditCarbideImport2.jpg

Working with a project

Once you have created or imported a project you can start working on it in the Carbide.c++ workbench. The Carbide.c++ workbench (that is, the desktop development environment) provides the following views:

  • An explorer window, which displays the various components of the software.
  • An editor window, in which you can edit the source code.
  • An outline window, which displays the software being worked on.
  • An output window, which displays the output from the various tools in use (such as compilers).

B5.jpg

In the figure above a skeleton HelloWorld project has been created with the New Project Wizard. This is a working application, which the user can edit personalize to create a new application. This would include, for example, editing the source files in the /src folder in order to implement the project. The included files in the /inc file (including .h and .hrh files) may also need to be edited, depending on what kind of an application is being created. All editing of files can be done in the full-featured editor, which provides standard text-editing functionality.

Notice, that all the windows in the workbench can be resized (maximized and hidden) freely and rearranged according to your needs. You can also save different layouts in configurations called perspectives and you can switch between different perspectives by clicking the perspective button on the right side of the menubar). A preconfigured debugging perspective allows you to examine code through windows displaying stack traces, variable values and other debugging information.

Building a project for the S60 emulator

The S60 emulator simulates a real S60 device. You can use the emulator to test your application on your PC. In order to be able to view an application in the emulator you need to create a WINSCW debug build of it. Notice, that you cannot install this build onto a real S60 device; for this you will need to create a GCCE (or ARMV5) release build.

To create a WINSCW build of a project in Carbide.c++ in order to be able to view it on the SDK emulator, do the following:

  1. Select Project > Properties from the menu bar.

The Properties dialog opens:

B6.jpg

1. The Properties dialog allows you to manage the build process; you can define all aspects of the build by entering the needed information here.

2. Click C/C++ Build in the dialog TOC.

3. Select "S60 3.0 Emulator Debug" from the Configuration drop-down menu.

4. Click OK.

5. Select Project > Build Project from the menu bar.

Carbide.c++ creates a build of your project according to the current configuration determined in the Properties dialog - in this case, a WINSCW build.

Running an application in the S60 emulator

Once you have created a WINSCW build of your project, you can run it on the SDK emulator.

1. Select Run > Run... from the menu bar.

The Run dialog opens:

B7.jpg

1. The Run dialog allows you to define the launch configuration of the build.

2. Select the WINSCW build from the Configurations list of the dilaog.

3. Define and/or accept the values in the fields (above all, make sure that the Executable and Emulator or host application paths are correct).

4. Click the Apply button.

5. Click the Run button.

The application is launched in the emulator.

See also: Running the emulator from Carbide.c++

Debugging

You can debug your application by clicking the "bug" icon in the toolbar. Carbide.c++ provides a full-feature debugger, including stepwise execution, breakpoints, and variable-value watching.


Building an application for a target device

In order to be able to install your application to a real S60 device you need to create a GCCE build of it. The process here is similar to building an application for the emulator, but in this case you need to specify a different configuration.

1. Select Project > Properties from the menu bar.

2. In the Properties dialog, click C/C++ Build in the dialog TOC.

3. Select "S60 3.0 GCCE UREL" from the Configuration drop-down menu.

4. Click OK.

5. Select Project > Build Project from the menu bar.

Carbide.c++ creates a build of your project according to the current configuration determined in the Properties dialog - in this case, a GCCE build - as well as the .sis file of this project, which is needed for installing it to a real device.

Internal Links

Using Carbide.c++

Carbide.c++ Tips

This page was last modified on 26 July 2012, at 05:11.
49 page views in the last 30 days.
×