CreateStaticDLL and UseStaticDLL: using a statically linked DLL

Description

The example shows how a class implemented in a statically linked DLL is used. The DLL is built by CreateStaticDLL and is used by UseStaticDLL.

Download

Click on the following link to download the example: StaticDLL.zip

Click on the following link to download additional files: CommonFramework.zip.

Click browse StaticDLL to view the example code.

Click browse CommonFramework to view additional files.

Build and Usage

The example may be in the directory in which you installed the Symbian platform, or it may be in src\common\developerlibrary\. The example includes the project files needed for building: bld.inf and two .mmp files.

The Symbian platform build process describes how to build Symbian programs. To run this example:

  1. Build CreateStaticDLL project, which results in the following:

    \epoc32\release\<target>\<urel or udeb>\CREATESTATICDLL.DLL.

    \epoc32\release\<target>\<urel or udeb>\CREATESTATICDLL.lib.

    They are needed by the UseStaticDLL project.

  2. Build UseStaticDLL, which results in:

    \epoc32\release\<target>\<urel or udeb>\USESTATICDLL.EXE.

    This project use the DLL created in the previous steps.

  3. Run the executable USESTATICDLL.EXE.

    Executables for the winscw target can be run on your PC. Executables for ARM targets must be copied to a phone before being run.