lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I am trying to load luasocket 2.0.2 from a c code using the following snippet

> call("require","socket") ;

where call function has the following signature

        inline int call(string function_name,string arg) {
            lua_getglobal(L,function_name.c_str());
            lua_pushstring(L,arg.c_str());
            if(lua_pcall(L,1,0,0)) ER("LuaEnvironment:call: " << "error while calling" << function_name << "\n" << lua_tostring(L,-1) << endl,-1)
            return 1;
        }

Also in my environment i have LUA_PATH = /media/.../socket.so  where socket.so is socket.so.2.0.2 renamed

I get an error

LuaEnvironment:call: error while callingrequire
error loading module 'socket' from file '../../../../engine/deplib/linux/socket.so':
    ../../../../engine/deplib/linux/socket.so:1: unexpected symbol near 'char(127)'

What can be the problem here ?

-Abhinav