lua-users home
lua-l archive

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


Simon Frost wrote:
Hi Folks,

Has anyone compiled (either statically linked to lua, or as a dll) lpeg using MinGW and Lua 5.1.2?

Not sure if this helps, but I used VC++ Express with this makefile:

CWARNS = -Wall
LUADIR = -I../src/scite/lua51/include/
COPT = -O2 -DNDEBUG
CFLAGS = $(CWARNS) $(LUADIR)
CC = cl
LD = link
LDFLAGS =
LIBS = KERNEL32.lib lua5.1.lib

ALL: lpeg.dll

clean:
	del /q lpeg.dll lpeg.obj lpeg.lib lpeg.exp

lpeg.obj: lpeg.c
	$(CC) $(CFLAGS) -c -olpeg.obj lpeg.c

lpeg.dll: lpeg.obj
	$(LD) $(LDFLAGS) -DEF:lpeg.def -DLL -OUT:lpeg.dll lpeg.obj $(LIBS)

-Mitchell;


Best
Simon