Symbian3/SDK/Source/GUID-9A38894D-98B8-5AFA-A36A-AC8B494EC2CC.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE reference
  PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="GUID-9A38894D-98B8-5AFA-A36A-AC8B494EC2CC" xml:lang="en"><title>libmexample:
Using the Standard C Math Library</title><shortdesc>This example demonstrates the use of math functions, such as <apiname>gamma(double)</apiname>,
that are part of the Standard C Maths support library (<codeph>libm.dll</codeph>). </shortdesc><prolog><metadata><keywords/></metadata></prolog><refbody>
<section id="GUID-D3589080-5DD4-5DDF-A269-A7D1687F4705"><title>Purpose</title> <p>This
example application shows how to use the <filepath>libm.dll</filepath> library.
It: </p> <ol id="GUID-BDAA52E1-6D3C-520C-9C3F-74A558955A86">
<li id="GUID-85A5E6A3-19BD-5060-A92E-CFAA7E522DF4"><p>reads an input value
supplied by the user </p> </li>
<li id="GUID-7D292EC7-FE00-5E35-9261-C11CB406CF32"><p>applies the gamma function
on the input value </p> </li>
<li id="GUID-B1C92272-17F9-5520-AC5D-A55B0C11963C"><p>prints the output. </p> </li>
</ol> </section>
<section id="GUID-2638D79E-A3D2-5A08-AFC3-00AF68C3C194-GENID-1-6-1-10-1-1-5-1-3-1-11-1-8-1-3-2"><title>Download</title> <p>Click
on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.zip" scope="external"> libmexample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.html" scope="peer">browse</xref> to view the example code. </p> </section>
<section id="GUID-C3619B7E-3AF5-58D1-99D1-45CADE74B54C"><title>Class summary</title> <p>The
example shows the use of the following API: </p> <ul>
<li id="GUID-3DF01930-3A0E-5645-8D7E-F70321CB2B31"><p> <xref href="GUID-D1B12DAA-B281-3D8C-9CFF-A2062EA72A0A.dita"><apiname>gamma(double)</apiname></xref> from
the Standard C Maths support library (<filepath>libm.dll</filepath>). </p> </li>
</ul> </section>
<section id="GUID-7D90F88D-B6DC-5287-AC55-AAF46443874A"><title>Building and
configuring</title> <p>To build the example: </p> <ul>
<li id="GUID-A00084B3-336E-57DE-A399-33DE044E6021"><p>You can build the example
from your IDE or the command line. </p> <p>If you use an IDE, import the <filepath>bld.inf</filepath> file
of the example into your IDE, and use the build command of the IDE. </p> <p>If
you use the command line, open a command prompt, and set the current directory
to the source code directory of the example. You can then build the example
with the SBSv1 build tools with the following commands: </p> <p><userinput>bldmake
bldfiles</userinput> </p> <p><userinput>abld build</userinput> </p> <p> <xref href="GUID-793A5EF9-CC16-5EEB-9011-6431EA76EB15.dita">How to use bldmake</xref> and <xref href="GUID-B6B54E07-3B34-5D5C-8815-93383FA8FB4B.dita">How to use abld</xref> describe
how to use the SBSv1 build tools. </p> </li>
<li id="GUID-91962C9F-6048-588E-8100-352354DC49C9"><p>For the emulator, the
example builds an executable called <filepath>libmexample.exe</filepath> in
the <filepath>epoc32\release\winscw\&lt;udeb or                 urel&gt;\</filepath> folder. </p> </li>
</ul> </section>
<section id="GUID-97F66C8D-36A9-50D4-8318-2A19BE9832D6"><title>Running the
example</title> <p>Run the <filepath>libmexample.exe</filepath> executable.
The example application waits for the user to enter an input value. </p> </section>
</refbody></reference>