[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: DLLs with MinGW
- From: "marcus.cf" <marcus.cf@...>
- Date: Thu, 19 Jun 2003 22:16:34 -0300
I was trying to compile Lua 5 as DLLs with MinGW (from
Dev-C++) to be used in Delphi and C.
The main issues were:
- Windows XP shell, which was unable to execute the
- Discover the precise options I would need (hunt
makefiles, config, build and the wiki)
- I wanted to learn how to do it by hand, without
Finally I compiled Lua as follows. If anyone spots an
error, please tell me. So far, it seems to work. I guess
I should put it on the wiki if it's correct.
set CFLAGS=-O2 -Wall -
gcc %CFLAGS% -I..\include -c *.c
set PIPE=-DUSE_POPEN=1 -Dpopen=_popen -Dpclose=_pclose
gcc %CFLAGS% %PIPE% -I..\..\include -c *.c
gcc -shared -Wl,--export-all-symbols -o bin\lua-5.0.dll
gcc -shared -Wl,--export-all-symbols -o bin\lualib-
5.0.dll src\lib\*.o bin\lua-5.0.dll
gcc %CFLAGS% -o bin\lua.exe -Iinclude -D_POSIX_SOURCE
src\lua\lua.c bin\lualib-5.0.dll bin\lua-5.0.dll
gcc %CFLAGS% -o src\luac\lopcodes.o -Iinclude -
DLUA_OPNAMES -c src\lopcodes.c
gcc %CFLAGS% -o bin\luac.exe -Iinclude -Isrc
src\luac\luac.c src\luac\print.c src\luac\lopcodes.o
The examples I found on the wiki were much more complex,
I feel I may be missing something...
Seleção de Softwares UOL.
10 softwares escolhidos pelo UOL para você e sua família.