Symbian3/SDK/Source/GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita
changeset 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7" xml:lang="en"><title>Building
       
    13 a Standard C++ Application or Library</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>This topic describes the required header files and libraries to compile
       
    15 and link against to build a Standard C++ application or library on a Symbian
       
    16 platform build environment. </p>
       
    17 <p>You can build a C++ application or library using one of the following target
       
    18 types: </p>
       
    19 <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>
       
    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>
       
    22 </ul>
       
    23 <p> <b>Notes:</b>  </p>
       
    24 <ul>
       
    25 <li id="GUID-CFA90167-E346-51CA-B4CB-A2D3812207EE"><p>The required standard
       
    26 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
       
    28 name is <filepath>libstdcppv5.lib</filepath>. </p> </li>
       
    29 <li id="GUID-9757C0C6-A141-594B-A29D-19D2E69283B6"><p>You must specify the
       
    30 system-include path and library name in the <filepath>.mmp</filepath> file
       
    31 associated with the C++ application or library. </p> </li>
       
    32 </ul>
       
    33 <section id="GUID-26AC2BCA-4A4F-5837-BBAD-7964CA0A5BED"><title> STD target
       
    34 types</title> <p>You can develop a C++ application or library using the following
       
    35 STD target types: </p> <ul>
       
    36 <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>
       
    38 <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
       
    40 symbol information into the executable. </p> <p> <b>Note:</b> For more information
       
    41 about STD target types (<codeph>STDEXE</codeph> /<codeph>STDDLL</codeph> /<codeph>STDLIB</codeph>),
       
    42 see the <xref href="GUID-1560C4FF-82EC-5E5D-A37D-3BBE046F0A5B.dita">Target Types</xref> section. </p> <p><b>Example</b> </p> <p>The
       
    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
       
    45 Target             test_stdexe.exe
       
    46 Targettype        stdexe
       
    47 Source            test1.cpp
       
    48 Systeminclude        /epoc32/include/stdapis/stlportv5
       
    49 Library            libstdcppv5.lib
       
    50 Capability        all -tcb
       
    51 //End of test_stdexe.mmp</codeblock> </section>
       
    52 <section id="GUID-F956CF72-58FC-5D9E-91EC-5B8866EE46C2"><title>Other Symbian
       
    53 target types</title> <p>You can avoid symbol information overhead while developing
       
    54 C++ applications or libraries, by performing the following configurations: </p> <ol id="GUID-95D63170-A738-562C-B648-D5E349E4EE32">
       
    55 <li id="GUID-65331FAD-A88C-5D36-BED2-255AED30F99F"><p>Use the other Symbian
       
    56 target types such as, <codeph>dll</codeph>, <codeph>lib</codeph>, <codeph>exe</codeph> and
       
    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>
       
    58 <li id="GUID-46EE0265-A60A-518C-BB4A-63F6D6FA29F3"><p>In addition, use the
       
    59 MMP keyword <codeph>STDCPP</codeph>. </p> </li>
       
    60 </ol> <p>You may also have to include <filepath>${EPOCROOT}/epoc32/include/stdapis</filepath> explicitly
       
    61 as the standard C headers are required by the standard C++ header. If you
       
    62 are referring to Standard C APIs directly or indirectly, you must specify <filepath>libc.lib</filepath> and <filepath>libpthread.lib</filepath> in
       
    63 the <filepath>.mmp</filepath> file. </p> <p><b>Example</b> </p> <p>The following
       
    64 code snippet illustrates the use of <codeph>STDCPP</codeph> MMP keyword and
       
    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
       
    66 Target             test_exe.exe
       
    67 Targettype        exe
       
    68 //The STDCPP keyword specifies Standard C++
       
    69 STDCPP
       
    70 Source            test2.cpp
       
    71 Systeminclude        /epoc32/include/stdapis/stlportv5
       
    72 Systeminclude        /epoc32/include/stdapis
       
    73 Library            libstdcppv5.lib libc.lib
       
    74 Staticlibrary        libcrt0.lib
       
    75 Capability        all -tcb
       
    76 //End of test_exe.mmp</codeblock> </section>
       
    77 </conbody><related-links>
       
    78 <link href="GUID-D6BEAF0D-844D-51F4-8DB7-FB1D60E17FE3.dita"><linktext>Copyright
       
    79 Acknowledgments for Standard C++ (STLport)</linktext></link>
       
    80 <link href="GUID-F7FEB759-E64D-5B6D-9017-C5E982E4FC16.dita"><linktext>Standard
       
    81 C++ Library Overview</linktext></link>
       
    82 <link href="GUID-2CCD1748-9EDE-5383-9941-A3051E06F3E2.dita"><linktext>Standard
       
    83 C++ Support on the Symbian Platform</linktext></link>
       
    84 <link href="GUID-CDE8CD85-8467-5B36-A0AC-41D1D98151CA.dita"><linktext>Developing
       
    85 Applications or Libraries Using Standard C++</linktext></link>
       
    86 <link href="GUID-5B3F5296-D6D0-5D25-8362-141DF5927E52.dita"><linktext>Troubleshooting</linktext>
       
    87 </link>
       
    88 <link href="GUID-D32E52C9-F05C-5F1E-8B49-243D555C353C.dita"><linktext>Known Issues</linktext>
       
    89 </link>
       
    90 </related-links></concept>