sol2/examples/source/tutorials/first_snippet.cpp

16 lines
322 B
C++
Raw Normal View History

2019-07-04 23:16:03 +08:00
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp> // or #include "sol.hpp", whichever suits your needs
int main(int argc, char* argv[]) {
2020-10-04 05:34:34 +08:00
// silence unused warnings
(void)argc;
(void)argv;
2019-07-04 23:16:03 +08:00
sol::state lua;
lua.open_libraries(sol::lib::base);
lua.script("print('bark bark bark!')");
return 0;
}