|
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-C8674786-6C09-45C2-BA5D-4F69EBD8E42F" xml:lang="en"><title>Creating |
|
13 the MMP File</title><shortdesc/><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p><b>Add needed libraries used by the MMP file structure:</b></p> |
|
15 <p>If developers want to use any of the P.I.P.S. libraries, they need to link |
|
16 to the corresponding library in the MMP file using the <codeph>LIBRARY</codeph> keyword.</p> |
|
17 <p>If the application has <codeph>main()</codeph> as the entry point, the |
|
18 library <filepath>libcrt0.lib</filepath> must be specified as the first library |
|
19 otherwise, it will result in linker errors. The user must link to the Symbian |
|
20 platform <filepath>euser.dll</filepath>. This is required since the static |
|
21 library uses some of the services of the Symbian platform such as creating |
|
22 cleanup stack, and having a top level TRAP. All these details are hidden from |
|
23 the developer. The developer will write the application as if it were for |
|
24 the UNIX environment.</p> |
|
25 <codeblock xml:space="preserve">STATICLIBRARY libcrt0.lib |
|
26 LIBRARY libc.lib |
|
27 LIBRARY euser.lib // Needed in order to use Symbian services |
|
28 // and whatever Open C libraries are needed… |
|
29 </codeblock> |
|
30 <p>The <filepath>libcrt0.lib</filepath> library is required if the user is |
|
31 not going to write <codeph>E32Main</codeph> within the application (EXE). |
|
32 This static library has an implementation of <codeph>E32Main</codeph> within |
|
33 which it calls the library initialization method followed by calling main |
|
34 written by the developer. This static library also gets command-line arguments |
|
35 and passes the same to main. </p> |
|
36 <p>If the application has <codeph>E32Main()</codeph> as an entry point, there |
|
37 is no need to link to <filepath>libcrt0.lib</filepath> like in the example |
|
38 below. </p> |
|
39 <codeblock xml:space="preserve">LIBRARY libc.lib |
|
40 LIBRARY libm.lib libpthread.lib |
|
41 LIBRARY euser.lib</codeblock> |
|
42 <p><b>Add needed include paths</b></p> |
|
43 <codeblock xml:space="preserve">SYSTEMINCLUDE \epoc32\include\stdapis |
|
44 </codeblock> |
|
45 <note>Some of the SSL/cryptography functions need more than the default available |
|
46 stack. The recommended stack size is 10K. To set the stack size to 10K add |
|
47 in the MMP file.</note> |
|
48 <codeblock xml:space="preserve">EPOCSTACKSIZE 0x10000</codeblock> |
|
49 </conbody></concept> |