我是Linux的新手,并使用Java的外部代码。我正在尝试编译LuaJava lib。
我输入“ make”并得到这样的错误:

src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1getField’:
src/c/luajava.c:2560: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2560: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2565: warning: implicit declaration of function ‘lua_getfield’
src/c/luajava.c:2565: warning: nested extern declaration of ‘lua_getfield’
src/c/luajava.c:2558: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1rawGet’:
src/c/luajava.c:2578: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2578: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2576: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1rawGetI’:
src/c/luajava.c:2592: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2592: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2594: warning: implicit declaration of function ‘lua_rawgeti’
src/c/luajava.c:2594: warning: nested extern declaration of ‘lua_rawgeti’
src/c/luajava.c:2590: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1createTable’:
src/c/luajava.c:2606: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2606: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2608: warning: implicit declaration of function ‘lua_createtable’
src/c/luajava.c:2608: warning: nested extern declaration of ‘lua_createtable’
src/c/luajava.c:2604: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1newTable’:
src/c/luajava.c:2620: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2620: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2618: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1getMetaTable’:
src/c/luajava.c:2634: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2634: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2636: warning: implicit declaration of function ‘lua_getmetatable’
src/c/luajava.c:2636: warning: nested extern declaration of ‘lua_getmetatable’
src/c/luajava.c:2632: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1getFEnv’:
src/c/luajava.c:2648: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2648: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2650: warning: implicit declaration of function ‘lua_getfenv’
src/c/luajava.c:2650: warning: nested extern declaration of ‘lua_getfenv’
src/c/luajava.c:2646: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1setTable’:
src/c/luajava.c:2662: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2662: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2660: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1setField’:
src/c/luajava.c:2676: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2676: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2681: warning: implicit declaration of function ‘lua_setfield’
src/c/luajava.c:2681: warning: nested extern declaration of ‘lua_setfield’
src/c/luajava.c:2674: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1rawSet’:
src/c/luajava.c:2695: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2695: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2693: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1rawSetI’:
src/c/luajava.c:2709: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2709: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2711: warning: implicit declaration of function ‘lua_rawseti’
src/c/luajava.c:2711: warning: nested extern declaration of ‘lua_rawseti’
src/c/luajava.c:2707: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1setMetaTable’:
src/c/luajava.c:2723: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2723: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2721: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1setFEnv’:
src/c/luajava.c:2737: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2737: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2739: warning: implicit declaration of function ‘lua_setfenv’
src/c/luajava.c:2739: warning: nested extern declaration of ‘lua_setfenv’
src/c/luajava.c:2735: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1call’:
src/c/luajava.c:2751: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2751: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2749: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1pcall’:
src/c/luajava.c:2765: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2765: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2767: warning: implicit declaration of function ‘lua_pcall’
src/c/luajava.c:2767: warning: nested extern declaration of ‘lua_pcall’
src/c/luajava.c:2763: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1yield’:
src/c/luajava.c:2779: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2779: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2781: warning: implicit declaration of function ‘lua_yield’
src/c/luajava.c:2781: warning: nested extern declaration of ‘lua_yield’
src/c/luajava.c:2777: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1resume’:
src/c/luajava.c:2793: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2793: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2795: warning: implicit declaration of function ‘lua_resume’
src/c/luajava.c:2795: warning: nested extern declaration of ‘lua_resume’
src/c/luajava.c:2791: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1status’:
src/c/luajava.c:2807: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2807: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2809: warning: implicit declaration of function ‘lua_status’
src/c/luajava.c:2809: warning: nested extern declaration of ‘lua_status’
src/c/luajava.c:2805: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1gc’:
src/c/luajava.c:2821: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2821: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2823: warning: implicit declaration of function ‘lua_gc’
src/c/luajava.c:2823: warning: nested extern declaration of ‘lua_gc’
src/c/luajava.c:2819: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1getGcCount’:
src/c/luajava.c:2835: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2835: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2837: warning: implicit declaration of function ‘lua_getgccount’
src/c/luajava.c:2837: warning: nested extern declaration of ‘lua_getgccount’
src/c/luajava.c:2833: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1next’:
src/c/luajava.c:2849: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2849: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2851: warning: implicit declaration of function ‘lua_next’
src/c/luajava.c:2851: warning: nested extern declaration of ‘lua_next’
src/c/luajava.c:2847: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1error’:
src/c/luajava.c:2863: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2863: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2865: warning: implicit declaration of function ‘lua_error’
src/c/luajava.c:2865: warning: nested extern declaration of ‘lua_error’
src/c/luajava.c:2861: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1concat’:
src/c/luajava.c:2877: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2877: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2879: warning: implicit declaration of function ‘lua_concat’
src/c/luajava.c:2879: warning: nested extern declaration of ‘lua_concat’
src/c/luajava.c:2875: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1pop’:
src/c/luajava.c:2891: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2891: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2889: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1setGlobal’:
src/c/luajava.c:2905: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2905: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2903: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1getGlobal’:
src/c/luajava.c:2923: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2923: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2921: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LdoFile’:
src/c/luajava.c:2941: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2941: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2947: warning: implicit declaration of function ‘luaL_dofile’
src/c/luajava.c:2947: warning: nested extern declaration of ‘luaL_dofile’
src/c/luajava.c:2939: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LdoString’:
src/c/luajava.c:2963: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2963: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2969: warning: implicit declaration of function ‘luaL_dostring’
src/c/luajava.c:2969: warning: nested extern declaration of ‘luaL_dostring’
src/c/luajava.c:2961: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LgetMetaField’:
src/c/luajava.c:2983: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:2983: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:2987: warning: implicit declaration of function ‘luaL_getmetafield’
src/c/luajava.c:2987: warning: nested extern declaration of ‘luaL_getmetafield’
src/c/luajava.c:2981: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcallMeta’:
src/c/luajava.c:3003: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3003: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3007: warning: implicit declaration of function ‘luaL_callmeta’
src/c/luajava.c:3007: warning: nested extern declaration of ‘luaL_callmeta’
src/c/luajava.c:3001: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1Ltyperror’:
src/c/luajava.c:3023: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3023: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3027: warning: implicit declaration of function ‘luaL_typerror’
src/c/luajava.c:3027: warning: nested extern declaration of ‘luaL_typerror’
src/c/luajava.c:3021: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LargError’:
src/c/luajava.c:3043: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3043: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3047: warning: implicit declaration of function ‘luaL_argerror’
src/c/luajava.c:3047: warning: nested extern declaration of ‘luaL_argerror’
src/c/luajava.c:3041: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcheckString’:
src/c/luajava.c:3063: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3063: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3066: warning: implicit declaration of function ‘luaL_checkstring’
src/c/luajava.c:3066: warning: nested extern declaration of ‘luaL_checkstring’
src/c/luajava.c:3061: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LoptString’:
src/c/luajava.c:3080: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3080: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3085: warning: implicit declaration of function ‘luaL_optstring’
src/c/luajava.c:3085: warning: nested extern declaration of ‘luaL_optstring’
src/c/luajava.c:3078: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcheckNumber’:
src/c/luajava.c:3103: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3103: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3105: warning: implicit declaration of function ‘luaL_checknumber’
src/c/luajava.c:3105: warning: nested extern declaration of ‘luaL_checknumber’
src/c/luajava.c:3101: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LoptNumber’:
src/c/luajava.c:3117: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3117: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3119: warning: implicit declaration of function ‘luaL_optnumber’
src/c/luajava.c:3119: warning: nested extern declaration of ‘luaL_optnumber’
src/c/luajava.c:3119: error: ‘lua_Number’ undeclared (first use in this function)
src/c/luajava.c:3119: error: expected ‘)’ before ‘def’
src/c/luajava.c:3115: warning: unused parameter ‘jobj’
src/c/luajava.c:3115: warning: unused parameter ‘def’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcheckInteger’:
src/c/luajava.c:3131: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3131: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3133: warning: implicit declaration of function ‘luaL_checkinteger’
src/c/luajava.c:3133: warning: nested extern declaration of ‘luaL_checkinteger’
src/c/luajava.c:3129: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LoptInteger’:
src/c/luajava.c:3145: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3145: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3147: warning: implicit declaration of function ‘luaL_optinteger’
src/c/luajava.c:3147: warning: nested extern declaration of ‘luaL_optinteger’
src/c/luajava.c:3147: error: ‘lua_Integer’ undeclared (first use in this function)
src/c/luajava.c:3147: error: expected ‘)’ before ‘def’
src/c/luajava.c:3143: warning: unused parameter ‘jobj’
src/c/luajava.c:3143: warning: unused parameter ‘def’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcheckStack’:
src/c/luajava.c:3159: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3159: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3162: warning: implicit declaration of function ‘luaL_checkstack’
src/c/luajava.c:3162: warning: nested extern declaration of ‘luaL_checkstack’
src/c/luajava.c:3157: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcheckType’:
src/c/luajava.c:3176: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3176: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3178: warning: implicit declaration of function ‘luaL_checktype’
src/c/luajava.c:3178: warning: nested extern declaration of ‘luaL_checktype’
src/c/luajava.c:3174: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LcheckAny’:
src/c/luajava.c:3190: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3190: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3192: warning: implicit declaration of function ‘luaL_checkany’
src/c/luajava.c:3192: warning: nested extern declaration of ‘luaL_checkany’
src/c/luajava.c:3188: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LnewMetatable’:
src/c/luajava.c:3204: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3204: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3208: warning: implicit declaration of function ‘luaL_newmetatable’
src/c/luajava.c:3208: warning: nested extern declaration of ‘luaL_newmetatable’
src/c/luajava.c:3202: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LgetMetatable’:
src/c/luajava.c:3224: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3224: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3227: warning: implicit declaration of function ‘luaL_getmetatable’
src/c/luajava.c:3227: warning: nested extern declaration of ‘luaL_getmetatable’
src/c/luajava.c:3222: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1Lwhere’:
src/c/luajava.c:3241: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3241: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3243: warning: implicit declaration of function ‘luaL_where’
src/c/luajava.c:3243: warning: nested extern declaration of ‘luaL_where’
src/c/luajava.c:3239: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1Lref’:
src/c/luajava.c:3255: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3255: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3257: warning: implicit declaration of function ‘luaL_ref’
src/c/luajava.c:3257: warning: nested extern declaration of ‘luaL_ref’
src/c/luajava.c:3253: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LunRef’:
src/c/luajava.c:3269: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3269: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3271: warning: implicit declaration of function ‘luaL_unref’
src/c/luajava.c:3271: warning: nested extern declaration of ‘luaL_unref’
src/c/luajava.c:3267: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LgetN’:
src/c/luajava.c:3283: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3283: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3285: warning: implicit declaration of function ‘luaL_getn’
src/c/luajava.c:3285: warning: nested extern declaration of ‘luaL_getn’
src/c/luajava.c:3281: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LsetN’:
src/c/luajava.c:3297: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3297: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3299: warning: implicit declaration of function ‘luaL_setn’
src/c/luajava.c:3299: warning: nested extern declaration of ‘luaL_setn’
src/c/luajava.c:3295: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LloadFile’:
src/c/luajava.c:3311: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3311: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3315: warning: implicit declaration of function ‘luaL_loadfile’
src/c/luajava.c:3315: warning: nested extern declaration of ‘luaL_loadfile’
src/c/luajava.c:3309: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LloadBuffer’:
src/c/luajava.c:3331: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3331: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3336: warning: implicit declaration of function ‘luaL_loadbuffer’
src/c/luajava.c:3336: warning: nested extern declaration of ‘luaL_loadbuffer’
src/c/luajava.c:3329: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LloadString’:
src/c/luajava.c:3354: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3354: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3358: warning: implicit declaration of function ‘luaL_loadstring’
src/c/luajava.c:3358: warning: nested extern declaration of ‘luaL_loadstring’
src/c/luajava.c:3352: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1Lgsub’:
src/c/luajava.c:3374: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3374: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3379: warning: implicit declaration of function ‘luaL_gsub’
src/c/luajava.c:3379: warning: nested extern declaration of ‘luaL_gsub’
src/c/luajava.c:3372: warning: unused parameter ‘jobj’
src/c/luajava.c: In function ‘Java_org_keplerproject_luajava_LuaState__1LfindTable’:
src/c/luajava.c:3397: error: ‘lua_State’ undeclared (first use in this function)
src/c/luajava.c:3397: error: ‘L’ undeclared (first use in this function)
src/c/luajava.c:3400: warning: implicit declaration of function ‘luaL_findtable’
src/c/luajava.c:3400: warning: nested extern declaration of ‘luaL_findtable’
src/c/luajava.c:3395: warning: unused parameter ‘jobj’
make: *** [src/c/luajava.o] Error 1


我已经更改了配置文件:

#############################################################

#Linux/BSD/Mac

LUA_DIR= /usr/local/share/lua/5.1.1

LUA_LIBDIR= /usr/local/lib

LUA_INCLUDES= /usr/local/include

JDK= /usr/lib/jvm/java-6-sun-1.6.0.26

# For Mac OS, comment the above line and uncomment this one

#JDK=/Library/Java/Home



# Full path to Lua static library

LIB_LUA=$(LUA_LIBDIR)/liblua5.1.a



#Linux/BSD

LIB_EXT= .so

#Mac OS

#LIB_EXT= .jnilib



LIB_PREFIX= lib



#Linux/BSD

LIB_OPTION= -shared

#Mac OS

#LIB_OPTION= -dynamiclib -all_load



## On FreeBSD and Mac OS systems, the following line should be commented

DLLIB= -ldl



WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings

INCS= -I$(JDK)/include -I$(JDK)/include/linux -I$(LUA_INCLUDES)

CFLAGS= $(WARN) $(INCS)



CC= gcc





#########################################################

VERSION= 1.1

PKG= luajava-$(VERSION)

TAR_FILE= $(PKG).tar.gz

ZIP_FILE= $(PKG).zip

JAR_FILE= $(PKG).jar

SO_FILE= $(LIB_PREFIX)$(PKG)$(LIB_EXT)

DIST_DIR= $(PKG)



# $Id: config,v 1.12 2006/12/22 14:06:40 thiago Exp $


我有.jar文件,没有lib **。so文件。将不胜感激。

最佳答案

您已经将Lua 5.1安装到该目录了吗?

LUA_DIR= /usr/local/share/lua/5.1.1


如果没有,那么您首先需要这样做。

关于java - 在Ubuntu 32bit下编译LuaJava,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7475797/

10-09 18:53