lua-users home
lua-l archive

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


You need to include lualib.h to convert from the old names to the new ones:

 lua_baselibopen	luaopen_base
 lua_tablibopen	luaopen_table
 lua_iolibopen	luaopen_io
 lua_strlibopen	luaopen_string
 lua_mathlibopen	luaopen_math
 lua_dblibopen	luaopen_debug

Eric Merritt wrote:
Hello all,

 I am trying to link a up to the lua runtime. As you
can see in the errors below I am getting undefined
references to a few lua functions. This is a bit weird
because all of the undefined references point to
functions in lualib, it seems that the lua library is
linking in just fine. Now lualib exists and is in the
same dir (/usr/local/lib) as the lua library. So I am
really unsure as to why these errors occure. I
searched the archive and the only time I found a
similar problem the user was using C++ not C and he
forgot the extern C around the include for lua. This
cannot be my problem because I am using strait C. It
would be great if one of you could offer suggestions.
Btw, I am using Redhat 8.0 and Lua 5.0. I compiled
these myself via the standard make process.

Thanks,
Eric