On 23/07/2012, at 9:33 AM, Mark Tolley wrote: > Ok, here's the complete code: The equivalent works for me on OS X, so I'm afraid I can't help much. Are you sure that it's the lua_error line that's the problem? Have you checked that luaL_newstate is not returning null? extern "C" { #include "lauxlib.h" #include <stdio.h> } int main(void) { lua_State *L = luaL_newstate(); lua_pushliteral(L, "literal"); try { lua_error(L); } catch (...) { fprintf(stderr, "caught it!\n"); return 1; } return 0; }