h1-mod/deps/sol2/examples/source/tutorials/open_multiple_libraries.cpp

17 lines
323 B
C++
Raw Normal View History

2024-03-07 00:54:15 -05:00
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
int main(int argc, char* argv[]) {
// silence unused warnings
(void)argc;
(void)argv;
sol::state lua;
lua.open_libraries(sol::lib::base,
sol::lib::coroutine,
sol::lib::string,
sol::lib::io);
lua.script("print('bark bark bark!')");
return 0;
}