[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: DLLs with MinGW
- From: Ignacio Castaño <castanyo@...>
- Date: Fri, 20 Jun 2003 04:35:07 +0200
Marcus, you just have to install MSYS or cygwin. If you don't want anything
fancy, download MSYS, it is very small and provides the basic build
environment, so that you just have to type 'make'.
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.