Websites Navigation: Airbit | Shop | m-shell.net
Languages: EN | DE

Compiling and Linking

A native module must be compiled into a polymorphic DLL file with name module_mm.dll, where module is the name by which the module is known to m. Such a DLL has UID2=0x1000008d. You are free to specify an UID3. If you do, the m runtime environment UID is an option:

UIDPlatform, signing type
0x1020429aSymbian 2nd Edition
0xa0009885Symbian 3rd/5th Edition, self signed and DevCert signed
0xe7e0cab8Symbian 3rd/5th Edition, online signed

Each module must be linked:

  • for Symbian 2nd Edition, with the Symbian libraries edll.lib and euser.lib, and the m runtime library mRuntime.lib.
  • for Symbian 3rd/5th Edition, with the Symbian library euser.dso, and the m runtime library mRuntime.dso. The latter comes in two versions for each device type, depending whether you link for a self signed, DevCert signed, or online signed m installation.
The other libraries depend on the Symbian APIs your native module uses.

World Server Example, Continued

Assuming the standard SDK, a minimum of three files are needed:
  1. The C++ source WorldModule.cpp.
  2. The bld.inf file naming the project file. A minimal file is:

    PRJ_MMPFILES
    World.mmp

  3. The World.mmp file describing the project. An example for Symbian 2nd Edition:

    // World native module project for Symbian 2nd
    TARGET World_mm.dll
    TARGETTYPE dll
    UID 0x1000008d 0x1020429a
    SOURCEPATH .
    SOURCE WorldModule.cpp
    USERINCLUDE ..\..\include
    SYSTEMINCLUDE \epoc32\include
    LIBRARY edll.lib euser.lib mRuntime.lib
    LIBRARY worldclient.lib
    EXPORTUNFROZEN

    The same for Symbian 3rd/5th Edition:

    // World native module project for Symbian 3rd/5th
    TARGET World_mm.dll
    TARGETTYPE dll
    UID 0x1000008d 0xa0009885
    CAPABILITY LocalServices NetworkServices ReadUserData \
    UserEnvironment WriteUserData
    SOURCEPATH .
    SOURCE WorldModule.cpp
    USERINCLUDE ..\..\include
    SYSTEMINCLUDE \epoc32\include
    LIBRARY euser.lib mRuntime.lib
    LIBRARY worldclient.lib
    EXPORTUNFROZEN

    The capabilities listed are the minimum set for a self signed m installation. See * () for further information.

Once all the files are in place, just call

bldmake bldfiles
abld build armi urel

After these two steps, Epoc32\release\armi\urel of your SDK should contain a file World_mm.dll. This is the native m module!

For Symbian 3rd/5th Edition, you must replace the platform armi by gcce:

abld build gcce urel

And the DLL file should be in Epoc32\release\gcce\urel of your SDK.


© 2004-2010 airbit AG, CH-8008 Zürich
Document AB-M-NMI-869
mShell Home  > Documentation  > Manuals