File types

File name extensions

The following file name extensions are used for source and binary files:

Table 1: File name extensions used for source and binary files

File name extension

Description

.aif

Symbian OS application information file

.app

Executable Symbian OS application, polymorphic DLL

.bmp

Windows bitmap file

.cpp

C++ source file

.dll

Shared library DLL

.exe

Symbian OS server or executable program

.h

C++ header file

.hrh

Common header file for resources and C++ programs

bld.inf

Component definition file

.inl

C++ inline function definition file

.loc

Localization string resource header file

.mbm

Symbian OS multi-bitmap file

.mif

Multi-image file (used for scalable icons)

.mmp

Symbian OS project specification file (for makmake)

.mk

Makefile

.rh

Resource header file

.rss

Resource file

.rsc

Compiled resource file (no language specified)

.rxx

Compiled resource file ("xx" is the language specifier)

.pkg

Package file; input for sis installation files

.sis

Installation file (all Symbian OS releases)

C++ header file (.h)

Note: The #ifndef XXX form of the guard against multiple inclusion is significantly quicker than the apparently equivalent #if !defined(XXX) form.

Wrong:

// MyClass.h
// This pollutes include-hierarchy:#include "OtherClass.h"
class CMyClass: public CBase
   {   
...
private:
       COtherClass* iPointer;
   };

Including "OtherClass.h" is unnecessary, but pollutes the include hierarchy for "MyClass.h". A better solution would be:

Example:

// MyClass.h
class COtherClass;
class CMyClass: public CBase
   {
   ...
private:
    COtherClass* iPointer;
   };

Note that now only "MyClass.cpp" has to include "OtherClass.h". Other modules using just "MyClass.h" never need "OtherClass.h".

// Example.h
// Copyright (c) 2003 Symbian Ltd. All rights reserved.
// Example module header
//

C++ source file (.cpp)

Resource file (.rss)

Common header file (.hrh)

Localization string resource header file (.loc)

Note: For common and generic texts, check if it already exists in avkon.loc, and use the text string from AVKON. Avoid duplicate and overlapping text items.

Project specification file (.mmp)

Note: Use the LANG SC statement to allow for conditional software builds. Using LANG SC allows for adding new language variants without having to update .mmp files.

Extension makefile (.mk)

Extension makefiles can be used where certain build steps that are not catered for by the generated makefiles are required. The makefiles must contain certain make targets. During build activities, abld will call the target corresponding to the build activity that is being carried out. This will then execute the commands that the makefile specifies for that target.

Package file (.pkg)

he native Symbian installation package file format is .sis. The makesis tool uses package files (.pkg) as input for creating .sis files. The .pkgfile is a text file that contains installation information for applications or files.

Inline file (.inl)

Inline functions must be defined in a separate file, that is, not in the header file.