diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-21 12:41:39 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-21 12:41:39 -0700 |
commit | 7a0ae20872841e0f3a242fba33cb18e65b95b14e (patch) | |
tree | e1065249f321edcf6d0b0a6a3067bbf0aacafce1 /demos/scons-embind/foo.cpp | |
parent | c1c49555772ea8598d3b942f485b907dd49cf0c1 (diff) | |
parent | 184ff9ea2d18c09988226afb90328679e9818d0d (diff) |
Merge pull request #1187 from imvu/scons-embind-build-system
SCons/embind build system
Diffstat (limited to 'demos/scons-embind/foo.cpp')
-rw-r--r-- | demos/scons-embind/foo.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/demos/scons-embind/foo.cpp b/demos/scons-embind/foo.cpp new file mode 100644 index 00000000..61be501a --- /dev/null +++ b/demos/scons-embind/foo.cpp @@ -0,0 +1,11 @@ +#include <stdio.h> +#include <emscripten/bind.h> + +void print_some_stuff(int a, float b, const std::string& s) { + printf("print_some_stuff: %d, %f, %s\n", a, b, s.c_str()); +} + +EMSCRIPTEN_BINDINGS(foo) { + emscripten::function("print_some_stuff", &print_some_stuff); +} + |