Symbian3/SDK/Source/GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita
changeset 0 89d6a7a84779
child 2 ebc84c812384
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept id="GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C" xml:lang="en"><title>Known
+Issues</title><prolog><metadata><keywords/></metadata></prolog><conbody>
+<p>This topic describes the known issues associated with developing Standard
+C++ applications or libraries on Symbian platform. </p>
+<p>The following functionalities of Standard C++ have certain limitations
+on Symbian platform: </p>
+<ul>
+<li id="GUID-8A496C80-74F0-559D-84B3-34EF8BA15A39"><p> <b>dynamic_cast:</b> The <codeph>dynamic_cast</codeph> operator
+is not fully supported on Symbian platform. </p> </li>
+<li id="GUID-012F6B22-4A66-5B54-B981-01A252F10147"><p> <b>unexpected_handler:</b> The
+CodeWarrior runtime does not support the invocation of <codeph>unexpected_handler</codeph> upon
+an exception specification violation. </p> </li>
+<li id="GUID-9FF61C6B-21D4-521D-A1FF-086D28FDAADF"><p> <b>IOStreams:</b> The <codeph>cin</codeph> and <codeph>cout</codeph> objects
+are instances of <codeph>istream</codeph> and <codeph>ostream</codeph> classes
+and are exported by the STL library. As the emulator tool-chain does not support
+exporting of data, these are defined as function calls on the emulator. </p> <p>These
+functions return references to the <codeph>cin</codeph> and <codeph>cout</codeph> objects
+that the STL library maintains. Since they are defined as functions, an attempt
+to import namespace by saying using <codeph>std::cout</codeph> may fail to
+compile. To resolve this issue, include the entire <codeph>std</codeph> namespace
+in such scenarios. </p> </li>
+</ul>
+<section id="GUID-EB8B9B0E-0971-4147-B8FB-94F2D602B61F"><title>ARM RVCT compiler
+issues with STLport</title><p>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:</p><ol>
+<li id="GUID-6BD383B8-C6C8-4C08-A741-2D90C21D274F"><p>Use the GCCE compiler
+to generate the DEF file, if it is not available.</p></li>
+<li id="GUID-EA6CD191-69CA-4AA5-80FB-704F52F583F6"><p>Ignore the warnings
+generated by the ARM RVCT compiler.</p><note>When you ignore the warnings,
+do not freeze the invalid export entries in the DEF file using the ARM RVCT
+compiler.</note></li>
+</ol></section>
+<section id="GUID-6008A836-2454-49E5-BE25-29EB9074CF88"><title>Using the id
+member variable of facet classes</title> <p>Symbian platform does not support
+exporting static data. Hence, the <codeph>id</codeph> member variable of facet
+classes (<codeph>static locale::id           id</codeph>) cannot be used directly
+on Symbian platform. When you use these classes you must use the <codeph>GetFacetLocaleId()</codeph> function
+to access the data member <codeph>id</codeph> instead. </p> <p> <b>Examples</b>  </p> <ol id="GUID-96B64FD3-382E-56E1-BAD6-90DFBDA0969F">
+<li id="GUID-20337C94-A194-5BD7-9974-490C1EBB543F"><p> <b>Using the id member
+of standard facets:</b> For example, you can change <codeph>locale::id Id1
+=                 numpunct&lt;char&gt;::id;</codeph> to <codeph>locale::id Id1
+=                 numpunct&lt;char&gt;::GetFacetLocaleId();</codeph>. </p> </li>
+<li id="GUID-F91F6741-FA71-5644-BE02-717E5872B293"><p> <b>Deriving a class
+from a standard facet:</b> Declare a <codeph>GetFacetLocaleId()</codeph> static
+method, in addition to the member variable ID, when you define a class that
+is inherited from the <codeph>locale::facet</codeph> class, as illustrated
+in the following code: </p> <codeblock id="GUID-692D5326-4048-52DC-8347-5006CBEFAF0F" xml:space="preserve">class myfacet : public locale::facet
+    {
+    public:
+    static locale::id id;
+    static locale::id&amp; GetFacetLocaleId() 
+        {
+        return id;
+        } 
+    };</codeblock> </li>
+<li id="GUID-600D7CAC-C9C5-5722-987A-66FE6E2D7D01"><p> <b>Using a class that
+is part of a DLL:</b> Ensure that you also handle the Writable Static Data
+(WSD) issues for emulator (WINSCW) builds along with the issues described
+in examples <b>1</b> and <b>2</b> as illustrated in the following code: </p> <codeblock id="GUID-8307FD25-D980-5FC1-A0FB-83098BE5D331" xml:space="preserve">//myfacet.h
+class myfacet : public locale::facet
+    {
+    public:
+#ifndef __WINSCW__  
+    static locale::id id;
+#endif
+    static locale::id&amp; GetFacetLocaleId();
+    };
+</codeblock> <codeblock id="GUID-57B95E9E-9071-50CC-A688-73C9781B26E4" xml:space="preserve">//myfacet.cpp
+std::locale::id&amp; 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()-&gt;myfacet_id;
+#endif
+    }</codeblock> </li>
+</ol> </section>
+<section id="GUID-35767460-AE19-47D2-B24F-0CFEC8B999EF"><title>Using memory
+leak detection macros</title> <p>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 <codeph>__UHEAP_MARK</codeph> and <codeph>__UHEAP_MARKEND</codeph>,
+then you get a panic at <codeph>__UHEAP_MARKEND</codeph>. </p> <p>To avoid
+this panic, you must call the <codeph>CleanupWSD()</codeph> function, provided
+only for use on emulator. For more information about how to achieve this,
+see the following example code: </p> <codeblock id="GUID-52610746-62BA-5EDB-A584-091CD6724260" xml:space="preserve">#include &lt;iostream&gt;
+using namespace std;
+#ifdef __WINSCW__
+#include &lt;libstdcppwsd.h&gt;
+#endif
+int main()
+    {
+    __UHEAP_MARK;
+    cout &lt;&lt; "Hello, World!" &lt;&lt; endl;
+#ifdef __WINSCW__
+    CleanupWSD();// Cleanup all WSD related allocations
+#endif
+    __UHEAP_MARKEND;
+    return 0;
+    }</codeblock> </section>
+</conbody><related-links>
+<link href="GUID-D6BEAF0D-844D-51F4-8DB7-FB1D60E17FE3.dita"><linktext>Copyright
+Acknowledgments for Standard C++                 (STLport)</linktext></link>
+<link href="GUID-F7FEB759-E64D-5B6D-9017-C5E982E4FC16.dita"><linktext>Standard
+C++ Library Overview</linktext></link>
+<link href="GUID-2CCD1748-9EDE-5383-9941-A3051E06F3E2.dita"><linktext>Standard
+C++ Support on Symbian Platform</linktext></link>
+<link href="GUID-CDE8CD85-8467-5B36-A0AC-41D1D98151CA.dita"><linktext>Developing
+Applications or Libraries                 Using Standard C++</linktext></link>
+<link href="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita"><linktext>Building
+a Standard C++ Application or                 Library</linktext></link>
+<link href="GUID-5B3F5296-D6D0-5D25-8362-141DF5927E52.dita"><linktext>Troubleshooting</linktext>
+</link>
+</related-links></concept>
\ No newline at end of file