lua-users home
lua-l archive

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


Hi,

I compiled lua 4.0 with Borland C 3.1 and encountered hardly any
problems at all, it's a tribute to the portability of the code. So since
the changes are so short, I take the liberty of posting them in this
message. If someone is willing to put the binaries on some site, I can
send them to you.

First the only patch, and that is a Borland C bug:

*** /usr/local/src/lua/src/lcode.h	Thu Aug 10 00:49:13 2000
--- ./lcode.h	Sat Aug 11 02:06:45 2001
***************
*** 42,48 ****
    char mode;
    unsigned char push;
    unsigned char pop;
! } luaK_opproperties[];
  
  
  void luaK_error (LexState *ls, const char *msg);
--- 42,48 ----
    char mode;
    unsigned char push;
    unsigned char pop;
! } luaK_opproperties[NUM_OPCODES];
  
  
  void luaK_error (LexState *ls, const char *msg);

Now the 4 bat files I used to compile:

lua/src/liblua.bat:

bcc -ml -c -I../include -I. *.c
tlib ..\lib\liblua.lib +lapi.obj
tlib ..\lib\liblua.lib +lcode.obj
tlib ..\lib\liblua.lib +ldebug.obj
tlib ..\lib\liblua.lib +ldo.obj
tlib ..\lib\liblua.lib +lfunc.obj
tlib ..\lib\liblua.lib +lgc.obj
tlib ..\lib\liblua.lib +llex.obj
tlib ..\lib\liblua.lib +lmem.obj
tlib ..\lib\liblua.lib +lobject.obj
tlib ..\lib\liblua.lib +lparser.obj
tlib ..\lib\liblua.lib +lstate.obj
tlib ..\lib\liblua.lib +lstring.obj
tlib ..\lib\liblua.lib +ltable.obj
tlib ..\lib\liblua.lib +ltests.obj
tlib ..\lib\liblua.lib +ltm.obj
tlib ..\lib\liblua.lib +lundump.obj
tlib ..\lib\liblua.lib +lvm.obj
tlib ..\lib\liblua.lib +lzio.obj

lua/src/lib/libluali.bat:

bcc -ml -c -I../../include -I.. *.c
tlib ..\..\lib\libluali.lib +lauxlib.obj
tlib ..\..\lib\libluali.lib +lbaselib.obj
tlib ..\..\lib\libluali.lib +ldblib.obj
tlib ..\..\lib\libluali.lib +liolib.obj
tlib ..\..\lib\libluali.lib +lmathlib.obj
tlib ..\..\lib\libluali.lib +lstrlib.obj

lua/src/lua/dolua.bat

bcc -ml -c -I../../include -I.. -U_POSIX_SOURCE lua.c
bcc -ml -elua.exe lua.obj ..\..\lib\liblua.lib ..\..\lib\libluali.lib

lua/src/luac/doluac.bat:

bcc -ml -c -I../../include -I.. *.c
bcc -ml -eluac.exe *.obj ..\..\lib\liblua.lib ..\..\lib\libluali.lib

That's it. Make the libraries before the interpreter and the compiler,
of course.