diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,129 @@ + + + + + +Known +Issues +

This topic describes the known issues associated with developing Standard +C++ applications or libraries on Symbian platform.

+

The following functionalities of Standard C++ have certain limitations +on Symbian platform:

+ +
ARM RVCT compiler +issues with STLport

Due to a defect in the ARM RVCT compiler versions +2.2, 3.1 and 4.0, building STLport v5 or STLport-based applications, creates +some invalid export entries in DEF files. To workaround this issue, perform +the following steps:

    +
  1. Use the GCCE compiler +to generate the DEF file, if it is not available.

  2. +
  3. Ignore the warnings +generated by the ARM RVCT compiler.

    When you ignore the warnings, +do not freeze the invalid export entries in the DEF file using the ARM RVCT +compiler.
  4. +
+
Using the id +member variable of facet classes

Symbian platform does not support +exporting static data. Hence, the id member variable of facet +classes (static locale::id id) cannot be used directly +on Symbian platform. When you use these classes you must use the GetFacetLocaleId() function +to access the data member id instead.

Examples

    +
  1. Using the id member +of standard facets: For example, you can change locale::id Id1 += numpunct<char>::id; to locale::id Id1 += numpunct<char>::GetFacetLocaleId();.

  2. +
  3. Deriving a class +from a standard facet: Declare a GetFacetLocaleId() static +method, in addition to the member variable ID, when you define a class that +is inherited from the locale::facet class, as illustrated +in the following code:

    class myfacet : public locale::facet + { + public: + static locale::id id; + static locale::id& GetFacetLocaleId() + { + return id; + } + };
  4. +
  5. Using a class that +is part of a DLL: Ensure that you also handle the Writable Static Data +(WSD) issues for emulator (WINSCW) builds along with the issues described +in examples 1 and 2 as illustrated in the following code:

    //myfacet.h +class myfacet : public locale::facet + { + public: +#ifndef __WINSCW__ + static locale::id id; +#endif + static locale::id& GetFacetLocaleId(); + }; + //myfacet.cpp +std::locale::id& myfacet::GetFacetLocaleId() + { +#ifndef __WINSCW__ + return id; +#else + // get the WSD struct – uses EWSD solution + // get_wsd_struct() is a function defined by + // the user to get a pointer to his WSD struct. + return get_wsd_struct()->myfacet_id; +#endif + }
  6. +
+
Using memory +leak detection macros

On an emulator, there are some dynamic memory +allocations made for supporting WSD, when the Standard C++ library is initialised. +In this scenario, if you add a memory leak detection macro, such as __UHEAP_MARK and __UHEAP_MARKEND, +then you get a panic at __UHEAP_MARKEND.

To avoid +this panic, you must call the CleanupWSD() function, provided +only for use on emulator. For more information about how to achieve this, +see the following example code:

#include <iostream> +using namespace std; +#ifdef __WINSCW__ +#include <libstdcppwsd.h> +#endif +int main() + { + __UHEAP_MARK; + cout << "Hello, World!" << endl; +#ifdef __WINSCW__ + CleanupWSD();// Cleanup all WSD related allocations +#endif + __UHEAP_MARKEND; + return 0; + }
+
+Copyright +Acknowledgments for Standard C++ (STLport) +Standard +C++ Library Overview +Standard +C++ Support on Symbian Platform +Developing +Applications or Libraries Using Standard C++ +Building +a Standard C++ Application or Library +Troubleshooting + +
\ No newline at end of file