Symbian3/SDK/Source/GUID-78175610-72F4-5CAF-B1E9-9A761347C9DB.dita
changeset 7 51a74ef9ed63
parent 0 89d6a7a84779
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 task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-78175610-72F4-5CAF-B1E9-9A761347C9DB" xml:lang="en"><title>Hello World: A minimal console application</title><shortdesc>This section describes the steps to build the Hello World project on the emulator.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    13     
       
    14     <context id="CONTEXT_860ECC705FBE48F2B9F0EDD54C40E65E"><p>The code in this section has been taken from the <filepath>Hello</filepath> example.</p><p>This example demonstrates the most basic use of STDLIB. It consists of the single source code file, <filepath>slhello.c</filepath> whose sole function, <codeph>main()</codeph> calls <codeph>printf()</codeph>.</p><p>The <filepath>Hello</filepath> example's project definition file (<filepath>Hello.mmp</filepath>) contains the following:</p><codeblock xml:space="preserve">TTARGET		hello.exe
       
    15 TARGETTYPE	exe
       
    16 UID      	0
       
    17 SOURCEPATH	.
       
    18 SOURCE		slhello.c
       
    19 SYSTEMINCLUDE	\epoc32\include\libc  \epoc32\include
       
    20 
       
    21 LIBRARY		estlib.lib euser.lib 
       
    22 STATICLIBRARY	ecrt0.lib</codeblock><note><ul id="UL_DFDA8F9623D74CA297DE7441131DB52D"><li id="LI_B1C004435F2D43C1B1FDE677EEBA847C">The import library <filepath>estlib.lib</filepath> is the C standard library.</li><li id="LI_EF2D86C46EC849CBB89C035811A0A3FA">The project also links to <filepath>ecrt0.lib</filepath>. This file provides the <codeph>E32Main()</codeph> entrypoint for a <filepath>.exe</filepath>. It also provides other services including command-line parsing, and it calls <codeph>main()</codeph>.</li><li id="LI_08D804A3357E42279398B608D9C94D63">The <codeph>SYSTEMINCLUDE</codeph> path specifies <filepath>\epoc32\include\libc\</filepath>, which is the location for STDLIB's header files.</li></ul></note>
       
    23 <p>For more information on the project specification for a <filepath>.exe</filepath> see <xref href="GUID-12D8C373-5199-5B89-9910-00F769AC164A.dita">How to build for an EXE target</xref>.</p></context><steps id="STEPS_FDBDA20C062F4610B084E58AD673A4E1">
       
    24       <step id="STEP_AD6C049FEF1C4BA89DEFD358291184A3"><cmd>To build <filepath>Hello</filepath> for the Emulator, run <filepath>bldmake</filepath> from the directory where the <filepath>bld.inf</filepath> file is located:</cmd>
       
    25         
       
    26       <stepxmp>bldmake bldfiles</stepxmp><stepresult>This creates the &lt;file&gt;abld.bat&lt;/file&gt; batch file.</stepresult></step>
       
    27     <step id="STEP_51BCB62257004034AAEDACCDCB219974"><cmd>Use <filepath>abld</filepath> to build the project, for instance:</cmd><stepxmp>abld build wins udeb</stepxmp></step><step id="STEP_6C69AE8D4AA64378BFE1B6AE443663A4"><cmd>To run it, invoke <filepath>hello.exe</filepath></cmd></step><step id="STEP_859A8F380CF04A4E86DC4CD787724E9E"><cmd>To build <filepath>Hello</filepath> for the target machine, invoke <codeph>bldmake</codeph> and <codeph>abld</codeph>, specifying the appropriate target platform.</cmd></step><step id="STEP_155632C1EC5B47C0A513D196B947AD8F"><cmd>To install software on the target device create a <filepath>.sis</filepath> file using the Symbian Installation system. </cmd><tutorialinfo>See the <xref href="GUID-0AF47934-0A16-51A2-9254-992D7C6B322B.dita">Application Installation Guide</xref></tutorialinfo></step></steps>
       
    28     
       
    29     
       
    30     
       
    31   </taskbody><related-links><link href="GUID-12D8C373-5199-5B89-9910-00F769AC164A.dita"><linktext>How to build for an EXE target</linktext></link><link href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita"><linktext>How to use the Symbian build process</linktext></link><link href="GUID-0AF47934-0A16-51A2-9254-992D7C6B322B.dita"><linktext>Application Installation Guide</linktext></link></related-links></task>