diff options
Diffstat (limited to 'deps/sol2/examples/source/tutorials/first_snippet.cpp')
-rw-r--r-- | deps/sol2/examples/source/tutorials/first_snippet.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/sol2/examples/source/tutorials/first_snippet.cpp b/deps/sol2/examples/source/tutorials/first_snippet.cpp new file mode 100644 index 0000000..018f9c6 --- /dev/null +++ b/deps/sol2/examples/source/tutorials/first_snippet.cpp @@ -0,0 +1,12 @@ +#define SOL_ALL_SAFETIES_ON 1
+#include <sol/sol.hpp> // or #include "sol.hpp", whichever suits your needs
+
+int main(int argc, char* argv[]) {
+
+ sol::state lua;
+ lua.open_libraries(sol::lib::base);
+
+ lua.script("print('bark bark bark!')");
+
+ return 0;
+}
|