diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita --- a/Symbian3/SDK/Source/GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-E331B72B-84AF-558A-9B8F-73E5E50B58C7.dita Tue Jul 20 12:00:49 2010 +0100 @@ -1,90 +1,87 @@ - - - - - -Building -a Standard C++ Application or Library -

This topic describes the required header files and libraries to compile -and link against to build a Standard C++ application or library on a Symbian -platform build environment.

-

You can build a C++ application or library using one of the following target -types:

- -

Notes:

- -
STD target -types

You can develop a C++ application or library using the following -STD target types:

    -
  • STDEXE

  • -
  • STDDLL

  • -
  • STDLIB

  • -

These target types enable symbol lookup by name thereby adding the -symbol information into the executable.

Note: For more information -about STD target types (STDEXE /STDDLL /STDLIB), -see the Target Types section.

Example

The -following code snippet illustrates the use of the STD target type stdexe:

//writing an stdexe, the mmp file may look like follows -//Start of test_stdexe.mmp -Target test_stdexe.exe -Targettype stdexe -Source test1.cpp -Systeminclude /epoc32/include/stdapis/stlportv5 -Library libstdcppv5.lib -Capability all -tcb -//End of test_stdexe.mmp
-
Other Symbian -target types

You can avoid symbol information overhead while developing -C++ applications or libraries, by performing the following configurations:

    -
  1. Use the other Symbian -target types such as, dll, lib, exe and -so on. For more information about other Symbian target types, see the targettype section.

  2. -
  3. In addition, use the -MMP keyword STDCPP.

  4. -

You may also have to include ${EPOCROOT}/epoc32/include/stdapis explicitly -as the standard C headers are required by the standard C++ header. If you -are referring to Standard C APIs directly or indirectly, you must specify libc.lib and libpthread.lib in -the .mmp file.

Example

The following -code snippet illustrates the use of STDCPP MMP keyword and -the use of the exe target type:

//test_exe.mmp -Target test_exe.exe -Targettype exe -//The STDCPP keyword specifies Standard C++ -STDCPP -Source test2.cpp -Systeminclude /epoc32/include/stdapis/stlportv5 -Systeminclude /epoc32/include/stdapis -Library libstdcppv5.lib libc.lib -Staticlibrary libcrt0.lib -Capability all -tcb -//End of test_exe.mmp
-
-Copyright -Acknowledgments for Standard C++ (STLport) -Standard -C++ Library Overview -Standard -C++ Support on the Symbian Platform -Developing -Applications or Libraries Using Standard C++ -Troubleshooting - -Known Issues - + + + + + +Building a Standard C++ Application or Library +

This topic describes the required header files and libraries to +compile and link against to build a Standard C++ application or library +on a Symbian platform build environment.

+

You can build a C++ application or library using one of the following +target types:

+
    +
  • STD target types

  • +
  • Other Symbian target types

  • +
+

Notes:

+
    +
  • The required +standard C++ header files are available in the ${EPOCROOT}/epoc32/include/stdapis/stlportv5 directory.

  • +
  • The standard +C++ library name is libstdcppv5.lib.

  • +
  • You must specify +the system-include path and library name in the .mmp file associated with the C++ application or library.

  • +
+
STD +target types

You can develop a C++ application or library +using the following STD target types:

    +
  • STDEXE

  • +
  • STDDLL

  • +
  • STDLIB

  • +

These target types enable symbol lookup by name thereby adding +the symbol information into the executable.

Note: For +more information about STD target types (STDEXE /STDDLL /STDLIB), see the Target Types section.

Example

The following code snippet +illustrates the use of the STD target type stdexe:

//writing an stdexe, the mmp file may look like follows +//Start of test_stdexe.mmp +Target test_stdexe.exe +Targettype stdexe +Source test1.cpp +Systeminclude /epoc32/include/stdapis/stlportv5 +Library libstdcppv5.lib +Capability all -tcb +//End of test_stdexe.mmp
+
Other +Symbian target types

You can avoid symbol information overhead +while developing C++ applications or libraries, by performing the +following configurations:

    +
  1. Use the other +Symbian target types such as, dll, lib, exe and so on. For more information about other +Symbian target types, see Symbian Tools Guide > Building + > Symbian Build System (SBSv1) > Build tools reference > MMP file +syntax > targettype.

  2. +
  3. In addition, +use the MMP keyword STDCPP.

  4. +

You may also have to include ${EPOCROOT}/epoc32/include/stdapis explicitly as the standard C headers are required by the standard +C++ header. If you are referring to Standard C APIs directly or indirectly, +you must specify libc.lib and libpthread.lib in the .mmp file.

Example

The following code snippet illustrates the use of STDCPP MMP keyword and the use of the exe target type:

//test_exe.mmp +Target test_exe.exe +Targettype exe +//The STDCPP keyword specifies Standard C++ +STDCPP +Source test2.cpp +Systeminclude /epoc32/include/stdapis/stlportv5 +Systeminclude /epoc32/include/stdapis +Library libstdcppv5.lib libc.lib +Staticlibrary libcrt0.lib +Capability all -tcb +//End of test_exe.mmp
+
+Copyright +Acknowledgments for Standard C++ (STLport) +Standard +C++ Library Overview +Standard +C++ Support on the Symbian Platform +Developing +Applications or Libraries Using Standard C++ +Troubleshooting + +Known +Issues
\ No newline at end of file