Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created June 17, 2012 19:59
Show Gist options
  • Save springmeyer/2945561 to your computer and use it in GitHub Desktop.
Save springmeyer/2945561 to your computer and use it in GitHub Desktop.
native client setup

install the sdk

Detailed docs at: https://developers.google.com/native-client/sdk/download

wget http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
unzip nacl_sdk.zip
cd nacl_sdk
./naclsdk update

prepare chrome

Chrome needs to have nacl enabled.

  • about:version should report a major version (e.g. 19) that matches the libpepper version that should now be visible in your nacl_sdk folder.
  • then go to about:flags and click the enable button in the Native Client Mac, Windows, Linux, Chrome OS section.
  • last, hit the 'relaunch chrome` button at the bottom of the page

run server

cd pepper_19/examples
make
python httpd.py
open http://localhost:5103

modify example app

cd hello_world_interactive rm *.o git init . git add . git commit -a -m "add original files" vim Makefile # add custom cflags and libs for your app

Gochas:

  • Do not put /usr/include in your cflags as it will prompt a clash between your system c++ headers and the nacle custom c++ headers
  • For boost to support threading pass -pthread -DBOOST_HAS_PTHREADS
  • remove -Wswitch-enum to allow boost thread to compile
  • remove -pedantic to allow boost ptree to compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment