Symbian3/PDK/Source/GUID-C9D4D586-58BF-5676-A53F-9C3A51101430.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-C9D4D586-58BF-5676-A53F-9C3A51101430"><title>Guidelines for Writing Standard C++ Libraries</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Ensure that you adhere to the following guidelines while writing Standard C++ Libraries on Symbian platform: </p> <ol id="GUID-A32C6BC0-A0FE-55DF-B553-C565E0429986"><li id="GUID-C89A488D-91C2-5D87-A0CD-50E8EA4906C5"><p> <b> Developing a DLL - Import/Export static data</b>  </p> <p>Importing or exporting writable static data from a DLL is not supported on 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 <xref href="GUID-5BDE6462-E6CA-5738-A587-C7D875574789.dita">Static data</xref> section. </p> </li> <li id="GUID-B6D7252A-8B10-55D9-8548-FFAF2BBB89B6"><p> <b>Developing a static library</b>  </p> <p>The Symbian build environment enforces the following rules: </p> <ol id="GUID-CE3218B3-CE02-538B-9045-3174E3DD8E66"><li id="GUID-4E9EDEDF-C7F4-58B6-B699-96E93C80AE06"><p>If a static library is of type <codeph>STDLIB</codeph>, it is allowed to be linked to by an <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph>. </p> </li> <li id="GUID-09D8FC39-DEB9-5C48-83D9-DBDD2914BB21"><p>If a static library is of type <codeph>STDLIB</codeph>, it is allowed to be linked to by an executable (<codeph>EXE</codeph> or a <codeph>DLL</codeph>) that has the <codeph>STDCPP</codeph> keyword in its <filepath>.mmp</filepath> file. </p> </li> <li id="GUID-5F808BD6-30BC-5D0A-A0C1-71798D6D1187"><p>If a static library is of target type <codeph>LIB</codeph> and its <filepath>.mmp</filepath> file contains the keyword <codeph>STDCPP</codeph>, it is allowed to be linked to by an <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph>. </p> </li> <li id="GUID-AAEE8D74-4B40-571F-B8ED-675239711EF9"><p>If a static library is of target type <filepath>LIB</filepath> and its <filepath>.mmp</filepath> file does <b>not</b> contain the keyword <codeph>STDCPP</codeph>, it is allowed to be linked to by an executable that does <b>not</b> contain the keyword <codeph>STDCPP</codeph>. </p> </li> <li id="GUID-E1FA66C4-138A-5BE7-9E79-9AEDE01FB2BC"><p>If a static library is of target type <codeph>LIB</codeph> and its <filepath>.mmp</filepath> file does <b>not</b> contain the keyword <codeph>STDCPP</codeph>, it is <b>not</b> allowed to be linked to by an executable that is an <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph>. </p> <p> <b>Note:</b> An attempt to violate this rule causes a build time error. </p> </li> <li id="GUID-016A6448-F8EC-5D46-B4BF-DBE9130CBF8B"><p>If a static library is of target type <codeph>STDLIB</codeph>, it is <b>not</b> allowed to be linked to by an executable (<codeph>EXE</codeph> or <codeph>DLL</codeph>) that does <b>not</b> mention the keyword <codeph>STDCPP</codeph>. </p> <p> <b>Note:</b> An attempt to violate this rule causes a build time error. </p> </li> </ol> </li> </ol> </conbody><related-links><link href="GUID-D6BEAF0D-844D-51F4-8DB7-FB1D60E17FE3.dita"><linktext>Copyright Acknowledgments for Standard C++
    12 <concept id="GUID-C9D4D586-58BF-5676-A53F-9C3A51101430" xml:lang="en"><title>Guidelines
    13                 (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-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita"><linktext>Building a Standard C++ Application or
    13 for Writing Standard C++ Libraries</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    14                 Library</linktext> </link> <link href="GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita"><linktext>Known Issues</linktext> </link> <link href="GUID-1ACD01D1-2055-581A-9478-2C0D7D1CF9E6.dita"><linktext>
    14 <p>Ensure that you adhere to the following guidelines while writing Standard
    15                 Use Cases for Writing Standard C++ Code</linktext> </link> <link href="GUID-AF2CE612-F12E-5A18-81A5-C303992D2D46.dita"><linktext>Possible Problems</linktext> </link> </related-links></concept>
    15 C++ Libraries on the Symbian platform: </p>
       
    16 <ol id="GUID-A32C6BC0-A0FE-55DF-B553-C565E0429986">
       
    17 <li id="GUID-C89A488D-91C2-5D87-A0CD-50E8EA4906C5"><p> <b> Developing a DLL
       
    18 - Import/Export static data</b>  </p> <p>Importing or exporting writable static
       
    19 data from a DLL is not supported on the Symbian platform. To achieve this,
       
    20 you must provide an exported function in the DLL to return a reference or
       
    21 pointer to that data. For more information about limitations on static data,
       
    22 see the <xref href="GUID-5BDE6462-E6CA-5738-A587-C7D875574789.dita">Static data</xref> section. </p> </li>
       
    23 <li id="GUID-B6D7252A-8B10-55D9-8548-FFAF2BBB89B6"><p> <b>Developing a static
       
    24 library</b>  </p> <p>The Symbian build environment enforces the following
       
    25 rules: </p> <ol id="GUID-CE3218B3-CE02-538B-9045-3174E3DD8E66">
       
    26 <li id="GUID-4E9EDEDF-C7F4-58B6-B699-96E93C80AE06"><p>If a static library
       
    27 is of type <codeph>STDLIB</codeph>, it is allowed to be linked to by an <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph>. </p> </li>
       
    28 <li id="GUID-09D8FC39-DEB9-5C48-83D9-DBDD2914BB21"><p>If a static library
       
    29 is of type <codeph>STDLIB</codeph>, it is allowed to be linked to by an executable
       
    30 (<codeph>EXE</codeph> or a <codeph>DLL</codeph>) that has the <codeph>STDCPP</codeph> keyword
       
    31 in its <filepath>.mmp</filepath> file. </p> </li>
       
    32 <li id="GUID-5F808BD6-30BC-5D0A-A0C1-71798D6D1187"><p>If a static library
       
    33 is of target type <codeph>LIB</codeph> and its <filepath>.mmp</filepath> file
       
    34 contains the keyword <codeph>STDCPP</codeph>, it is allowed to be linked to
       
    35 by an <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph>. </p> </li>
       
    36 <li id="GUID-AAEE8D74-4B40-571F-B8ED-675239711EF9"><p>If a static library
       
    37 is of target type <filepath>LIB</filepath> and its <filepath>.mmp</filepath> file
       
    38 does <b>not</b> contain the keyword <codeph>STDCPP</codeph>, it is allowed
       
    39 to be linked to by an executable that does <b>not</b> contain the keyword <codeph>STDCPP</codeph>. </p> </li>
       
    40 <li id="GUID-E1FA66C4-138A-5BE7-9E79-9AEDE01FB2BC"><p>If a static library
       
    41 is of target type <codeph>LIB</codeph> and its <filepath>.mmp</filepath> file
       
    42 does <b>not</b> contain the keyword <codeph>STDCPP</codeph>, it is <b>not</b> allowed
       
    43 to be linked to by an executable that is an <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph>. </p> <p> <b>Note:</b> An
       
    44 attempt to violate this rule causes a build time error. </p> </li>
       
    45 <li id="GUID-016A6448-F8EC-5D46-B4BF-DBE9130CBF8B"><p>If a static library
       
    46 is of target type <codeph>STDLIB</codeph>, it is <b>not</b> allowed to be
       
    47 linked to by an executable (<codeph>EXE</codeph> or <codeph>DLL</codeph>)
       
    48 that does <b>not</b> mention the keyword <codeph>STDCPP</codeph>. </p> <p> <b>Note:</b> An
       
    49 attempt to violate this rule causes a build time error. </p> </li>
       
    50 </ol> </li>
       
    51 </ol>
       
    52 </conbody><related-links>
       
    53 <link href="GUID-D6BEAF0D-844D-51F4-8DB7-FB1D60E17FE3.dita"><linktext>Copyright
       
    54 Acknowledgments for Standard C++                 (STLport)</linktext></link>
       
    55 <link href="GUID-F7FEB759-E64D-5B6D-9017-C5E982E4FC16.dita"><linktext>Standard
       
    56 C++ Library Overview</linktext></link>
       
    57 <link href="GUID-2CCD1748-9EDE-5383-9941-A3051E06F3E2.dita"><linktext> Standard
       
    58 C++ Support on the Symbian Platform</linktext></link>
       
    59 <link href="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita"><linktext>Building
       
    60 a Standard C++ Application or                 Library</linktext></link>
       
    61 <link href="GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita"><linktext>Known Issues</linktext>
       
    62 </link>
       
    63 <link href="GUID-1ACD01D1-2055-581A-9478-2C0D7D1CF9E6.dita"><linktext>        
       
    64         Use Cases for Writing Standard C++ Code</linktext></link>
       
    65 <link href="GUID-AF2CE612-F12E-5A18-81A5-C303992D2D46.dita"><linktext>Possible
       
    66 Problems</linktext></link>
       
    67 </related-links></concept>