OLD | NEW |
1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
2 | 2 |
3 <section id="c-tutorial-getting-started-part-1"> | 3 <section id="c-tutorial-getting-started-part-1"> |
4 <span id="tutorial"></span><h1 id="c-tutorial-getting-started-part-1"><span id="
tutorial"></span>C++ Tutorial: Getting Started (Part 1)</h1> | 4 <span id="tutorial"></span><h1 id="c-tutorial-getting-started-part-1"><span id="
tutorial"></span>C++ Tutorial: Getting Started (Part 1)</h1> |
5 <div class="contents local topic" id="contents"> | 5 <div class="contents local" id="contents" style="display: none"> |
6 <ul class="small-gap"> | 6 <ul class="small-gap"> |
7 <li><p class="first"><a class="reference internal" href="#overview" id="id1">Ove
rview</a></p> | 7 <li><p class="first"><a class="reference internal" href="#overview" id="id1">Ove
rview</a></p> |
8 <ul class="small-gap"> | 8 <ul class="small-gap"> |
9 <li><a class="reference internal" href="#what-the-application-in-this-tutorial-d
oes" id="id2">What the application in this tutorial does</a></li> | 9 <li><a class="reference internal" href="#what-the-application-in-this-tutorial-d
oes" id="id2">What the application in this tutorial does</a></li> |
10 <li><a class="reference internal" href="#communication-between-javascript-and-na
tive-client-modules" id="id3">Communication between JavaScript and Native Client
modules</a></li> | 10 <li><a class="reference internal" href="#communication-between-javascript-and-na
tive-client-modules" id="id3">Communication between JavaScript and Native Client
modules</a></li> |
11 </ul> | 11 </ul> |
12 </li> | 12 </li> |
13 <li><a class="reference internal" href="#step-1-download-and-install-the-native-
client-sdk" id="id4">Step 1: Download and install the Native Client SDK</a></li> | 13 <li><a class="reference internal" href="#step-1-download-and-install-the-native-
client-sdk" id="id4">Step 1: Download and install the Native Client SDK</a></li> |
14 <li><a class="reference internal" href="#step-2-start-a-local-server" id="id5">S
tep 2: Start a local server</a></li> | 14 <li><a class="reference internal" href="#step-2-start-a-local-server" id="id5">S
tep 2: Start a local server</a></li> |
15 <li><a class="reference internal" href="#step-3-set-up-the-chrome-browser" id="i
d6">Step 3: Set up the Chrome browser</a></li> | 15 <li><a class="reference internal" href="#step-3-set-up-the-chrome-browser" id="i
d6">Step 3: Set up the Chrome browser</a></li> |
16 <li><a class="reference internal" href="#step-4-stub-code-for-the-tutorial" id="
id7">Step 4: Stub code for the tutorial</a></li> | 16 <li><a class="reference internal" href="#step-4-stub-code-for-the-tutorial" id="
id7">Step 4: Stub code for the tutorial</a></li> |
17 <li><a class="reference internal" href="#step-5-compile-the-native-client-module
-and-run-the-stub-application" id="id8">Step 5: Compile the Native Client module
and run the stub application</a></li> | 17 <li><a class="reference internal" href="#step-5-compile-the-native-client-module
-and-run-the-stub-application" id="id8">Step 5: Compile the Native Client module
and run the stub application</a></li> |
18 <li><a class="reference internal" href="#step-6-modify-the-javascript-code-to-se
nd-a-message-to-the-native-client-module" id="id9">Step 6: Modify the JavaScript
code to send a message to the Native Client module</a></li> | 18 <li><a class="reference internal" href="#step-6-modify-the-javascript-code-to-se
nd-a-message-to-the-native-client-module" id="id9">Step 6: Modify the JavaScript
code to send a message to the Native Client module</a></li> |
19 <li><a class="reference internal" href="#step-7-implement-a-message-handler-in-t
he-native-client-module" id="id10">Step 7: Implement a message handler in the Na
tive Client module</a></li> | 19 <li><a class="reference internal" href="#step-7-implement-a-message-handler-in-t
he-native-client-module" id="id10">Step 7: Implement a message handler in the Na
tive Client module</a></li> |
20 <li><a class="reference internal" href="#step-8-compile-the-native-client-module
-and-run-the-application-again" id="id11">Step 8: Compile the Native Client modu
le and run the application again</a></li> | 20 <li><a class="reference internal" href="#step-8-compile-the-native-client-module
-and-run-the-application-again" id="id11">Step 8: Compile the Native Client modu
le and run the application again</a></li> |
21 <li><a class="reference internal" href="#troubleshooting" id="id12">Troubleshoot
ing</a></li> | 21 <li><a class="reference internal" href="#troubleshooting" id="id12">Troubleshoot
ing</a></li> |
22 <li><a class="reference internal" href="#next-steps" id="id13">Next steps</a></l
i> | 22 <li><a class="reference internal" href="#next-steps" id="id13">Next steps</a></l
i> |
23 </ul> | 23 </ul> |
24 </div> | 24 |
25 <section id="overview"> | 25 </div><section id="overview"> |
26 <h2 id="overview">Overview</h2> | 26 <h2 id="overview">Overview</h2> |
27 <p>This tutorial shows how to build and run a web application using Portable Nat
ive | 27 <p>This tutorial shows how to build and run a web application using Portable Nat
ive |
28 Client (PNaCl). This is a client-side application that uses HTML, JavaScript and | 28 Client (PNaCl). This is a client-side application that uses HTML, JavaScript and |
29 a Native Client module written in C++. The PNaCl toolchain is used to enable | 29 a Native Client module written in C++. The PNaCl toolchain is used to enable |
30 running the Native Client module directly from a web page.</p> | 30 running the Native Client module directly from a web page.</p> |
31 <p>It’s recommended to read the <a class="reference internal" href="/nativ
e-client/overview.html"><em>Native Client Technical Overview</em></a> prior to g
oing through this tutorial.</p> | 31 <p>It’s recommended to read the <a class="reference internal" href="/nativ
e-client/overview.html"><em>Native Client Technical Overview</em></a> prior to g
oing through this tutorial.</p> |
32 <section id="what-the-application-in-this-tutorial-does"> | 32 <section id="what-the-application-in-this-tutorial-does"> |
33 <h3 id="what-the-application-in-this-tutorial-does">What the application in this
tutorial does</h3> | 33 <h3 id="what-the-application-in-this-tutorial-does">What the application in this
tutorial does</h3> |
34 <p>The application in this tutorial shows how to load a Native Client module in
a | 34 <p>The application in this tutorial shows how to load a Native Client module in
a |
35 web page, and how to send messages between JavaScript and the C++ code in the | 35 web page, and how to send messages between JavaScript and the C++ code in the |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 <li>See the <a class="reference internal" href="/native-client/devguide/devcycle
/building.html"><em>Building</em></a>, <a class="reference internal" href="/nati
ve-client/devguide/devcycle/running.html"><em>Running</em></a>, and <a class="re
ference internal" href="/native-client/devguide/devcycle/debugging.html"><em>Deb
ugging pages</em></a> for information about how to build, run, and | 237 <li>See the <a class="reference internal" href="/native-client/devguide/devcycle
/building.html"><em>Building</em></a>, <a class="reference internal" href="/nati
ve-client/devguide/devcycle/running.html"><em>Running</em></a>, and <a class="re
ference internal" href="/native-client/devguide/devcycle/debugging.html"><em>Deb
ugging pages</em></a> for information about how to build, run, and |
238 debug Native Client applications.</li> | 238 debug Native Client applications.</li> |
239 <li>Check the <a class="reference external" href="http://code.google.com/p/naclp
orts/">naclports</a> project to see | 239 <li>Check the <a class="reference external" href="http://code.google.com/p/naclp
orts/">naclports</a> project to see |
240 what libraries have been ported for use with Native Client. If you port an | 240 what libraries have been ported for use with Native Client. If you port an |
241 open-source library for your own use, we recommend adding it to naclports | 241 open-source library for your own use, we recommend adding it to naclports |
242 (see <a class="reference external" href="http://code.google.com/p/naclports/wiki
/HowTo_Checkin">How to check code into naclports</a>).</li> | 242 (see <a class="reference external" href="http://code.google.com/p/naclports/wiki
/HowTo_Checkin">How to check code into naclports</a>).</li> |
243 </ul> | 243 </ul> |
244 </section></section> | 244 </section></section> |
245 | 245 |
246 {{/partials.standard_nacl_article}} | 246 {{/partials.standard_nacl_article}} |
OLD | NEW |