lua-users home
lua-l archive

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


  This works because gcc exports and imports symbols to/from DLLs in a
different way of Visual C++. 

  With the new executable I now get the same result.

Best,
scuri

> I was unable to duplicate the problem.  That is, when I use the
> luac5.1.exe from LuaBinaries, I get the crash, but when I compile
> luac, it seems to work just fine.
> 
>      -Mark
> 
> wget http://www.lua.org/ftp/lua-5.1.1.tar.gz
> wget http://luaforge.net/frs/download.php/1922/lua5_1_1_Sources.tar.gz
> tar xzf lua-5.1.1.tar.gz; cd lua-5.1.1/src
> tar xOzf ../../lua5_1_1_Sources.tar.gz lua5.1/src/lua5.1.def 
> >lua5.1.def
> gcc -mno-cygwin -shared -o lua5.1.dll lapi.c lcode.c ldebug.c ldo.c
> ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c lparser.c
> lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c
> lbaselib.c ldblib.c liolib.c lmathlib.c loslib.c ltablib.c lstrlib.c
> loadlib.c linit.c lua5.1.def
> gcc -mno-cygwin -o luac5.1.exe luac.c print.c lua5.1.dll
> echo 'print"Hello"' >hello.lua
> ./luac5.1 -l -p hello.lua
> 
> main <hello.lua:0,0> (4 instructions, 16 bytes at 003D5658)
> 0+ params, 2 slots, 0 upvalues, 0 locals, 2 constants, 0 functions
>         1       [1]     GETGLOBAL       0 -1    ; print
>         2       [1]     LOADK           1 -2    ; "Hello"
>         3       [1]     CALL            0 2 1
>         4       [1]     RETURN          0 1
>