lua-users home
lua-l archive

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


Hi,

The case is:

If I use the correct syntax:

lua_State *L=luaL_newstate();

I get the follow error:

/root/Ricardo/Outros/Lua/Kdevelop/teste/src/main.cpp:80: undefined reference to `luaL_newstate'

It seems like I haven't linked the correct library, but if I use the wrong syntax:

lua_State *L=luaL_newstate("something");

I get the follow error:

/usr/local/include/lauxlib.h:82: error: too many arguments to function ‘lua_State* luaL_newstate()’

Then, I'm confuse: If the library is wrongly linked, gcc wouldn't know how much arguments are asked by luaL_newstate, right?

Did I forget something to look for?

Thanks all.

--

Ricardo Sarmento