2
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
2 |
<html>
|
|
3 |
<head>
|
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
5 |
<meta http-equiv="Content-Style-Type" content="text/css" />
|
|
6 |
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
|
|
7 |
<title>Precompiled Headers </title>
|
|
8 |
<link rel="StyleSheet" href="../../book.css" type="text/css"/>
|
|
9 |
</head>
|
|
10 |
<body bgcolor="#FFFFFF">
|
|
11 |
<h2>Precompiled Headers </h2>
|
|
12 |
<p>Precompiled header support is available for Symbian OS projects that use the Nokia x86
|
|
13 |
compiler. Precompiled header files use the <span class="code">.pch++ </span>extension and are only supported by emulator targets. </p>
|
|
14 |
<p>By default, the x86 compiler compiles the <span class="code">.pch++</span> file before compiling any <span class="code">.cpp</span> files in a project. </p>
|
|
15 |
<p>A precompiled header file (<span class="code">.pch++</span>) outputs to a new identically named file with the <span class="code">.mch</span> extension. For example, <span class="code">HelloWorld.pch++</span> outputs as <span class="code">HelloWorld.mch</span>. C++ source files must use the <span class="code">.pch++</span> extension.</p>
|
|
16 |
<p>Listing 1 shows an example of a precompiled header source file called
|
|
17 |
<span class="code">pch_test.pch++</span>.</p>
|
|
18 |
<div class="listing">
|
|
19 |
<h4>Listing 1 .pch Precompiled Header example</h4>
|
|
20 |
<p class="listing">#include <e32def.h><br />
|
|
21 |
#pragma precompile_target "pch_test.mch"<br />
|
|
22 |
<br />
|
|
23 |
#define FOO 1<br />
|
|
24 |
#define LATIDA 345</p>
|
|
25 |
<p class="listing">typedef struct foo<br />
|
|
26 |
{<br />
|
|
27 |
int i, j, k, l, m;<br />
|
|
28 |
char foobar[256];<br />
|
|
29 |
} foo;</p>
|
|
30 |
</div>
|
|
31 |
<p>The resultant output file, <span class="code">pch_test.mch</span> can be included in other source or prefix files as:</p>
|
|
32 |
<p class="listing"> #include pch_test.mch</p>
|
|
33 |
<p> </p>
|
|
34 |
<div id="footer">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
|
|
35 |
|
|
36 |
</body>
|
|
37 |
</html> |