|
On 19 Nov '05, at 4:35 AM, Manfred Lotz wrote:
I had similar problems getting any C libraries to load on Mac OS X. The 'lua' executable needs to export the symbols in the Lua C API, so that libraries it loads can call them; but the makefile 'install' target was stripping all symbols out of the executable. Here's my solution; I have never developed for other Unix platforms so I don't know if this would work on them. This is for Lua 5.0.2, btw. I edited the top-level 'config' file's STRIP definition: STRIP= strip -s src/lua.exp -i Then I created a file src/lua.exp: # lua.exp -- symbols to export from Lua executables that load Lua compiled libraries _lua_atpanic _lua_call _lua_checkstack _lua_concat _lua_cpcall _lua_dump _lua_equal _lua_error _lua_getfenv _lua_getgccount _lua_getgcthreshold _lua_getmetatable _lua_gettable _lua_gettop _lua_getupvalue _lua_ident _lua_insert _lua_iscfunction _lua_isnumber _lua_isstring _lua_isuserdata _lua_lessthan _lua_load _lua_newtable _lua_newthread _lua_newuserdata _lua_next _lua_pcall _lua_pushboolean _lua_pushcclosure _lua_pushfstring _lua_pushlightuserdata _lua_pushlstring _lua_pushnil _lua_pushnumber _lua_pushstring _lua_pushupvalues _lua_pushvalue _lua_pushvfstring _lua_rawequal _lua_rawget _lua_rawgeti _lua_rawset _lua_rawseti _lua_remove _lua_replace _lua_setfenv _lua_setgcthreshold _lua_setmetatable _lua_settable _lua_settop _lua_setupvalue _lua_strlen _lua_toboolean _lua_tocfunction _lua_tonumber _lua_topointer _lua_tostring _lua_tothread _lua_touserdata _lua_type _lua_typename _lua_version _lua_xmove # liblualib: _luaL_addlstring _luaL_addstring _luaL_addvalue _luaL_argerror _luaL_buffinit _luaL_callmeta _luaL_checkany _luaL_checklstring _luaL_checknumber _luaL_checkstack _luaL_checktype _luaL_checkudata _luaL_error _luaL_findstring _luaL_getmetafield _luaL_getmetatable _luaL_getn _luaL_loadbuffer _luaL_loadfile _luaL_newmetatable _luaL_openlib _luaL_optlstring _luaL_optnumber _luaL_prepbuffer _luaL_pushresult _luaL_ref _luaL_setn _luaL_typerror _luaL_unref _luaL_where |