Symbian3/SDK/Source/GUID-E0284006-9173-5BC5-A899-E0873CA1AE1F.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     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 xml:lang="en" id="GUID-E0284006-9173-5BC5-A899-E0873CA1AE1F"><title>Native EXEs and LIBs vs. OE EXEs and LIBs</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The conventional way of defining the entry point for a Symbian platform executable is by including "<codeph>E32Main</codeph> " in the application source. Since Symbian OS v9.3, you can define the entry point for an executable by including "<codeph>main</codeph> " instead of "<codeph>E32Main</codeph> ". With this approach, Symbian developers may easily port their C/C++ code to Symbian platform with less changes to the original source. </p> <p>Symbian OS v9.3 and later releases provide an Open Environment (OE) to develop EXEs with the "<codeph>main</codeph> " entry point. The OE executables and libraries are identified by their <xref href="GUID-9535CF67-7541-554E-BE5C-9FDDFDB58EA5.dita">targettype</xref>, which can either be <codeph>STDEXE</codeph>, <codeph>STDDLL</codeph> or <codeph>STDLIB</codeph>. An OE EXE may choose to have a wide character entry point using the MMP keyword, <xref href="GUID-D5358527-5E6F-5158-8BCB-F9D74DB9B354.dita">wcharentrypoint</xref>. </p> <p>Here is a list of important differences between native Symbian platform executables and OE executables: </p> <ul><li id="GUID-A9322D93-0A1E-5785-BE67-614B8B748AE0"><p>Native Symbian platform EXEs use "<codeph>E32Main</codeph> " entry point, whereas OE EXEs use "<codeph>main</codeph> " entry point. </p> </li> <li id="GUID-1AAD269D-6356-5815-ABCE-FAD04B8A0CDB"><p>The UIDs used to identify native Symbian platform EXEs and DLLs are different when compared to OE EXEs and DLLs. </p> </li> <li id="GUID-88201F59-70F4-553D-8469-788876C37746"><p>In a native Symbian platform executable, the functions and data symbols with <codeph>extern</codeph> linkage are exported only if <codeph>IMPORT_C</codeph> /<codeph>EXPORT_C</codeph> declarations are found in the header or source files. In a OE executable, all functions and data symbols with <codeph>extern</codeph> linkage are exported by default without <codeph>IMPORT_C</codeph> /<codeph>EXPORT_C</codeph> declarations in the header or source files. </p> </li> <li id="GUID-3DFF529C-D652-5815-BE51-9AA86450EFF0"><p>The libraries required by a native Symbian platform executable/library have to be listed explicitly in the MMP file, whereas for an OE executable/library they are included by default. </p> </li> <li id="GUID-C1CEB4E1-A4EC-52C9-9F32-AFB2F3C75CB7"><p>The native Symbian platform EXEs and DLLs does not have symbol lookup, whereas OE EXEs and DLLs support symbol lookup using <xref scope="external" href="http://www.opengroup.org/onlinepubs/009695399/functions/dlsym.html">dlsym</xref>. </p> </li> <li id="GUID-FA1C6B88-6D8A-5CB4-B4B2-98EA055B422C"><p>A native Symbian platform EXE, DLL or LIB must include the path to standard APIs in the <filepath>mmp</filepath> file. For an OE EXE, DLL or LIB the build system includes <filepath>${EPOCROOT}epoc32/include/stdapis</filepath> as the default path for header files. </p> </li> </ul> <p>The build system has been modified to support compilation of C++ source files with extensions “<filepath>.cc</filepath> ”, “<filepath>.cxx</filepath> ” and “<filepath>.c++</filepath> ”. This change is applicable to both OE and native Symbian platform executables and libraries. That is, from Symbian OS v9.3 onwards a native Symbian platform or an OE executable/library can be built using C++ source files with extensions “<filepath>.cc</filepath> ”, “<filepath>.cxx</filepath> ” and “<filepath>.c++</filepath> ”. </p> </conbody></concept>