OLD | NEW |
1 .. _sdk-examples-2: | 1 .. _sdk-examples-2: |
2 | 2 |
3 .. TODO: After default toolchain is changed to pnacl, recreate the make examples
. | 3 .. TODO: After default toolchain is changed to pnacl, recreate the make examples
. |
4 | 4 |
5 Examples | 5 Examples |
6 ======== | 6 ======== |
7 | 7 |
8 Every Native Client SDK bundle comes with a folder of example applications. | 8 Every Native Client SDK bundle comes with a folder of example applications. |
9 Each example demonstrates one or two key Native Client programming concepts. | 9 Each example demonstrates one or two key Native Client programming concepts. |
10 After you've :doc:`downloaded the SDK <download>`, follow the instructions | 10 After you've :doc:`downloaded the SDK <download>`, follow the instructions |
11 on this page to build and run the examples. | 11 on this page to build and run the examples. |
12 | 12 |
13 Your version of Chrome must be equal to or greater than the version of your SDK | 13 Your version of Chrome must be equal to or greater than the version of your SDK |
14 bundle. For example, if you're developing with the ``pepper_35`` bundle, you | 14 bundle. For example, if you're developing with the ``pepper_35`` bundle, you |
15 must use Google Chrome version 35 or greater. To find out what version of Chrome | 15 must use Google Chrome version 35 or greater. To find out what version of Chrome |
16 you're using, type ``about:chrome`` or ``about:version`` in the Chrome address | 16 you're using, type ``about:chrome`` or ``about:version`` in the Chrome address |
17 bar. | 17 bar. |
18 | 18 |
19 .. _enable-native-client: | |
20 | |
21 Enable Native Client | |
22 -------------------- | |
23 | |
24 If you are using Chrome 31 or later, you can skip this section. To run Portable | |
25 Native Client applications you must specifically enable Native Client in Chrome: | |
26 | |
27 #. Type ``about:flags`` in the Chrome address bar and scroll down to "Native | |
28 Client". | |
29 | |
30 - If the link below "Native Client" says "Disable", then Native Client is | |
31 already enabled and you don't need to do anything else. | |
32 | |
33 * If the link below "Native Client" says "Enable", click the "Enable" | |
34 link. | |
35 | |
36 #. Scroll down to the bottom of the page, and click "Relaunch Now". All browser | |
37 windows will restart when you relaunch Chrome. | |
38 | |
39 .. _build-the-sdk-examples: | 19 .. _build-the-sdk-examples: |
40 | 20 |
41 Build the SDK examples | 21 Build the SDK examples |
42 ---------------------- | 22 ---------------------- |
43 | 23 |
44 The Makefile scripts for the SDK examples can build multiple versions of the | 24 The Makefile scripts for the SDK examples can build multiple versions of the |
45 examples using any of the three SDK toolchains (newlib, glibc, and PNaCl) and in | 25 examples using any of the three SDK toolchains (newlib, glibc, and PNaCl) and in |
46 both release and debug configurations. Note that some examples, ``dlopen`` for | 26 both release and debug configurations. Note that some examples, ``dlopen`` for |
47 example, build only with particular toolchains. | 27 example, build only with particular toolchains. |
48 | 28 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 247 |
268 At this point, you can use the standard GDB commands to debug your NaCl module. | 248 At this point, you can use the standard GDB commands to debug your NaCl module. |
269 The most common commands you will use to debug are ``continue``, ``step``, | 249 The most common commands you will use to debug are ``continue``, ``step``, |
270 ``next``, ``break`` and ``backtrace``. See | 250 ``next``, ``break`` and ``backtrace``. See |
271 :doc:`Debugging <../devguide/devcycle/debugging>` for more information about | 251 :doc:`Debugging <../devguide/devcycle/debugging>` for more information about |
272 debugging a Native Client application. | 252 debugging a Native Client application. |
273 | 253 |
274 | 254 |
275 .. |menu-icon| image:: /images/menu-icon.png | 255 .. |menu-icon| image:: /images/menu-icon.png |
276 .. |gear-icon| image:: /images/gear-icon.png | 256 .. |gear-icon| image:: /images/gear-icon.png |
OLD | NEW |