Guidelines for Writing Standard C++ Libraries

Ensure that you adhere to the following guidelines while writing Standard C++ Libraries on the Symbian platform:

  1. Developing a DLL - Import/Export static data

    Importing or exporting writable static data from a DLL is not supported on the Symbian platform. To achieve this, you must provide an exported function in the DLL to return a reference or pointer to that data. For more information about limitations on static data, see the Static data section.

  2. Developing a static library

    The Symbian build environment enforces the following rules:

    1. If a static library is of type STDLIB, it is allowed to be linked to by an STDEXE or STDDLL.

    2. If a static library is of type STDLIB, it is allowed to be linked to by an executable (EXE or a DLL) that has the STDCPP keyword in its .mmp file.

    3. If a static library is of target type LIB and its .mmp file contains the keyword STDCPP, it is allowed to be linked to by an STDEXE or STDDLL.

    4. If a static library is of target type LIB and its .mmp file does not contain the keyword STDCPP, it is allowed to be linked to by an executable that does not contain the keyword STDCPP.

    5. If a static library is of target type LIB and its .mmp file does not contain the keyword STDCPP, it is not allowed to be linked to by an executable that is an STDEXE or STDDLL.

      Note: An attempt to violate this rule causes a build time error.

    6. If a static library is of target type STDLIB, it is not allowed to be linked to by an executable (EXE or DLL) that does not mention the keyword STDCPP.

      Note: An attempt to violate this rule causes a build time error.

Related concepts