lua-users home
lua-l archive

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


I execute the following batch file :

gcc -O2 -Wall -c *.c

set LUADLL=lua5.dll

set LUALIBDLL=lualib5.dll

ren lua.o lua.obj

ren luac.o luac.obj

ren print.o print.obj

gcc -shared -W1,--export-all-symbols -o %LUADLL% *.o

strip --strip-unneeded %LUADLL%

gcc -o lua.exe -s lua.obj %LUADLL% -lm

gcc -o luac.exe -static luac.obj print.obj -lm

It creates lua.exe and lua5.dll with no further notice.

When trying to build luac.exe I get the following messages :

luac.obj:luac.c:(.text+0x134): undefined reference to `lua_touserdata'

luac.obj:luac.c:(.text+0x14e): undefined reference to `lua_checkstack'

luac.obj:luac.c:(.text+0x191): undefined reference to `luaL_loadfile'

luac.obj:luac.c:(.text+0x1b0): undefined reference to `lua_tolstring'

luac.obj:luac.c:(.text+0x1d0): undefined reference to `luaF_newproto'

luac.obj:luac.c:(.text+0x215): undefined reference to `luaS_newlstr'

luac.obj:luac.c:(.text+0x23e): undefined reference to `luaM_toobig'

luac.obj:luac.c:(.text+0x27c): undefined reference to `luaM_realloc_'

luac.obj:luac.c:(.text+0x32f): undefined reference to `luaU_dump'

luac.obj:luac.c:(.text+0x382): undefined reference to `luaM_realloc_'

luac.obj:luac.c:(.text+0x3c7): undefined reference to `luaM_toobig'

luac.obj:luac.c:(.text+0x3ec): undefined reference to `luaD_growstack'

luac.obj:luac.c:(.text+0x5c9): undefined reference to `luaL_newstate'

luac.obj:luac.c:(.text+0x5f3): undefined reference to `lua_cpcall'

luac.obj:luac.c:(.text+0x60f): undefined reference to `lua_tolstring'

luac.obj:luac.c:(.text+0x61c): undefined reference to `lua_close'

print.obj:print.c:(.text+0x4e3): undefined reference to `luaP_opnames'

print.obj:print.c:(.text+0x4f9): undefined reference to `luaP_opmodes'

collect2: ld returned 1 exit status

 

Could someone enlighten me why this is not working ? 

Thank you very much in advance.