Symbian3/SDK/Source/GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita
changeset 13 48780e181b38
parent 7 51a74ef9ed63
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     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 id="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7" xml:lang="en"><title>Building
    12 <concept id="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7" xml:lang="en"><title>Building a Standard C++ Application or Library</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 a Standard C++ Application or Library</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 <p>This topic describes the required header files and libraries to
    14 <p>This topic describes the required header files and libraries to compile
    14 compile and link against to build a Standard C++ application or library
    15 and link against to build a Standard C++ application or library on a Symbian
    15 on a Symbian platform build environment. </p>
    16 platform build environment. </p>
    16 <p>You can build a C++ application or library using one of the following
    17 <p>You can build a C++ application or library using one of the following target
    17 target types: </p>
    18 types: </p>
       
    19 <ul>
    18 <ul>
    20 <li id="GUID-2D0C8AC4-DC70-5F4A-B9D8-BCC61E088C8B"><p><xref href="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita#GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7/GUID-26AC2BCA-4A4F-5837-BBAD-7964CA0A5BED"> STD target types</xref>  </p> </li>
    19 <li id="GUID-2D0C8AC4-DC70-5F4A-B9D8-BCC61E088C8B"><p><xref href="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita#GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7/GUID-26AC2BCA-4A4F-5837-BBAD-7964CA0A5BED"> STD target types</xref>  </p> </li>
    21 <li id="GUID-C9E53DA5-FCDC-5D2A-9F66-60D97415ABCB"><p><xref href="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita#GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7/GUID-F956CF72-58FC-5D9E-91EC-5B8866EE46C2">Other Symbian target types</xref>  </p> </li>
    20 <li id="GUID-C9E53DA5-FCDC-5D2A-9F66-60D97415ABCB"><p><xref href="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita#GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7/GUID-F956CF72-58FC-5D9E-91EC-5B8866EE46C2">Other Symbian target types</xref>  </p> </li>
    22 </ul>
    21 </ul>
    23 <p> <b>Notes:</b>  </p>
    22 <p> <b>Notes:</b>  </p>
    24 <ul>
    23 <ul>
    25 <li id="GUID-CFA90167-E346-51CA-B4CB-A2D3812207EE"><p>The required standard
    24 <li id="GUID-CFA90167-E346-51CA-B4CB-A2D3812207EE"><p>The required
    26 C++ header files are available in the <filepath>${EPOCROOT}/epoc32/include/stdapis/stlportv5</filepath> directory. </p> </li>
    25 standard C++ header files are available in the <filepath>${EPOCROOT}/epoc32/include/stdapis/stlportv5</filepath> directory. </p> </li>
    27 <li id="GUID-721CE7A0-A015-5607-90B6-F430F0B8A528"><p>The standard C++ library
    26 <li id="GUID-721CE7A0-A015-5607-90B6-F430F0B8A528"><p>The standard
    28 name is <filepath>libstdcppv5.lib</filepath>. </p> </li>
    27 C++ library name is <filepath>libstdcppv5.lib</filepath>. </p> </li>
    29 <li id="GUID-9757C0C6-A141-594B-A29D-19D2E69283B6"><p>You must specify the
    28 <li id="GUID-9757C0C6-A141-594B-A29D-19D2E69283B6"><p>You must specify
    30 system-include path and library name in the <filepath>.mmp</filepath> file
    29 the system-include path and library name in the <filepath>.mmp</filepath> file associated with the C++ application or library. </p> </li>
    31 associated with the C++ application or library. </p> </li>
       
    32 </ul>
    30 </ul>
    33 <section id="GUID-26AC2BCA-4A4F-5837-BBAD-7964CA0A5BED"><title> STD target
    31 <section id="GUID-26AC2BCA-4A4F-5837-BBAD-7964CA0A5BED"><title> STD
    34 types</title> <p>You can develop a C++ application or library using the following
    32 target types</title> <p>You can develop a C++ application or library
    35 STD target types: </p> <ul>
    33 using the following STD target types: </p> <ul>
    36 <li id="GUID-52EC8316-33D1-5962-B71A-8F54AC7CC698"><p> <codeph>STDEXE</codeph>  </p> </li>
    34 <li id="GUID-52EC8316-33D1-5962-B71A-8F54AC7CC698"><p> <codeph>STDEXE</codeph>  </p> </li>
    37 <li id="GUID-3B07B0F9-B1CF-5F11-ADB2-DB648D93A60D"><p> <codeph>STDDLL</codeph>  </p> </li>
    35 <li id="GUID-3B07B0F9-B1CF-5F11-ADB2-DB648D93A60D"><p> <codeph>STDDLL</codeph>  </p> </li>
    38 <li id="GUID-68E852B9-41F4-5550-990E-256EA37EA337"><p> <codeph>STDLIB</codeph>  </p> </li>
    36 <li id="GUID-68E852B9-41F4-5550-990E-256EA37EA337"><p> <codeph>STDLIB</codeph>  </p> </li>
    39 </ul> <p>These target types enable symbol lookup by name thereby adding the
    37 </ul> <p>These target types enable symbol lookup by name thereby adding
    40 symbol information into the executable. </p> <p> <b>Note:</b> For more information
    38 the symbol information into the executable. </p> <p> <b>Note:</b> For
    41 about STD target types (<codeph>STDEXE</codeph> /<codeph>STDDLL</codeph> /<codeph>STDLIB</codeph>),
    39 more information about STD target types (<codeph>STDEXE</codeph> /<codeph>STDDLL</codeph> /<codeph>STDLIB</codeph>), see the <xref href="GUID-1560C4FF-82EC-5E5D-A37D-3BBE046F0A5B.dita">Target Types</xref> section. </p> <p><b>Example</b> </p> <p>The following code snippet
    42 see the <xref href="GUID-1560C4FF-82EC-5E5D-A37D-3BBE046F0A5B.dita">Target Types</xref> section. </p> <p><b>Example</b> </p> <p>The
    40 illustrates the use of the STD target type <codeph>stdexe</codeph>: </p> <codeblock id="GUID-BA167FFD-2F44-5BA4-8C2B-FF388648CC9B" xml:space="preserve">//writing an stdexe, the mmp file may look like follows
    43 following code snippet illustrates the use of the STD target type <codeph>stdexe</codeph>: </p> <codeblock id="GUID-BA167FFD-2F44-5BA4-8C2B-FF388648CC9B" xml:space="preserve">//writing an stdexe, the mmp file may look like follows
       
    44 //Start of test_stdexe.mmp
    41 //Start of test_stdexe.mmp
    45 Target             test_stdexe.exe
    42 Target             test_stdexe.exe
    46 Targettype        stdexe
    43 Targettype        stdexe
    47 Source            test1.cpp
    44 Source            test1.cpp
    48 Systeminclude        /epoc32/include/stdapis/stlportv5
    45 Systeminclude        /epoc32/include/stdapis/stlportv5
    49 Library            libstdcppv5.lib
    46 Library            libstdcppv5.lib
    50 Capability        all -tcb
    47 Capability        all -tcb
    51 //End of test_stdexe.mmp</codeblock> </section>
    48 //End of test_stdexe.mmp</codeblock> </section>
    52 <section id="GUID-F956CF72-58FC-5D9E-91EC-5B8866EE46C2"><title>Other Symbian
    49 <section id="GUID-F956CF72-58FC-5D9E-91EC-5B8866EE46C2"><title>Other
    53 target types</title> <p>You can avoid symbol information overhead while developing
    50 Symbian target types</title> <p>You can avoid symbol information overhead
    54 C++ applications or libraries, by performing the following configurations: </p> <ol id="GUID-95D63170-A738-562C-B648-D5E349E4EE32">
    51 while developing C++ applications or libraries, by performing the
    55 <li id="GUID-65331FAD-A88C-5D36-BED2-255AED30F99F"><p>Use the other Symbian
    52 following configurations: </p> <ol id="GUID-95D63170-A738-562C-B648-D5E349E4EE32">
    56 target types such as, <codeph>dll</codeph>, <codeph>lib</codeph>, <codeph>exe</codeph> and
    53 <li id="GUID-65331FAD-A88C-5D36-BED2-255AED30F99F"><p>Use the other
    57 so on. For more information about other Symbian target types, see the <xref href="GUID-9535CF67-7541-554E-BE5C-9FDDFDB58EA5.dita">targettype</xref> section. </p> </li>
    54 Symbian target types such as, <codeph>dll</codeph>, <codeph>lib</codeph>, <codeph>exe</codeph> and so on. For more information about other
    58 <li id="GUID-46EE0265-A60A-518C-BB4A-63F6D6FA29F3"><p>In addition, use the
    55 Symbian target types, see <uicontrol>Symbian Tools Guide &gt; Building
    59 MMP keyword <codeph>STDCPP</codeph>. </p> </li>
    56  &gt; Symbian Build System (SBSv1) &gt; Build tools reference &gt; MMP file
    60 </ol> <p>You may also have to include <filepath>${EPOCROOT}/epoc32/include/stdapis</filepath> explicitly
    57 syntax &gt; targettype</uicontrol>. </p> </li>
    61 as the standard C headers are required by the standard C++ header. If you
    58 <li id="GUID-46EE0265-A60A-518C-BB4A-63F6D6FA29F3"><p>In addition,
    62 are referring to Standard C APIs directly or indirectly, you must specify <filepath>libc.lib</filepath> and <filepath>libpthread.lib</filepath> in
    59 use the MMP keyword <codeph>STDCPP</codeph>. </p> </li>
    63 the <filepath>.mmp</filepath> file. </p> <p><b>Example</b> </p> <p>The following
    60 </ol> <p>You may also have to include <filepath>${EPOCROOT}/epoc32/include/stdapis</filepath> explicitly as the standard C headers are required by the standard
    64 code snippet illustrates the use of <codeph>STDCPP</codeph> MMP keyword and
    61 C++ header. If you are referring to Standard C APIs directly or indirectly,
    65 the use of the <codeph>exe</codeph> target type: </p> <codeblock id="GUID-31D4A97F-7809-515E-AB0C-801B60E60455" xml:space="preserve">//test_exe.mmp
    62 you must specify <filepath>libc.lib</filepath> and <filepath>libpthread.lib</filepath> in the <filepath>.mmp</filepath> file. </p> <p><b>Example</b> </p> <p>The following code snippet illustrates the use of <codeph>STDCPP</codeph> MMP keyword and the use of the <codeph>exe</codeph> target type: </p> <codeblock id="GUID-31D4A97F-7809-515E-AB0C-801B60E60455" xml:space="preserve">//test_exe.mmp
    66 Target             test_exe.exe
    63 Target             test_exe.exe
    67 Targettype        exe
    64 Targettype        exe
    68 //The STDCPP keyword specifies Standard C++
    65 //The STDCPP keyword specifies Standard C++
    69 STDCPP
    66 STDCPP
    70 Source            test2.cpp
    67 Source            test2.cpp
    83 C++ Support on the Symbian Platform</linktext></link>
    80 C++ Support on the Symbian Platform</linktext></link>
    84 <link href="GUID-CDE8CD85-8467-5B36-A0AC-41D1D98151CA.dita"><linktext>Developing
    81 <link href="GUID-CDE8CD85-8467-5B36-A0AC-41D1D98151CA.dita"><linktext>Developing
    85 Applications or Libraries Using Standard C++</linktext></link>
    82 Applications or Libraries Using Standard C++</linktext></link>
    86 <link href="GUID-5B3F5296-D6D0-5D25-8362-141DF5927E52.dita"><linktext>Troubleshooting</linktext>
    83 <link href="GUID-5B3F5296-D6D0-5D25-8362-141DF5927E52.dita"><linktext>Troubleshooting</linktext>
    87 </link>
    84 </link>
    88 <link href="GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita"><linktext>Known Issues</linktext>
    85 <link href="GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita"><linktext>Known
    89 </link>
    86 Issues</linktext></link>
    90 </related-links></concept>
    87 </related-links></concept>