Skip to content

Instantly share code, notes, and snippets.

@ploubser
Created May 22, 2012 13:38
Show Gist options
  • Save ploubser/2769119 to your computer and use it in GitHub Desktop.
Save ploubser/2769119 to your computer and use it in GitHub Desktop.
C calling Lua
#include <stdio.h>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
int main(void) {
lua_State *L = lua_open();
luaL_openlibs(L);
luaL_loadfile(L, "host.lua");
lua_pcall(L, 0, 0, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment