[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: compiling lpeg for windows
- From: gary ng <garyng2000@...>
- Date: Sun, 6 Apr 2008 22:01:47 -0700 (PDT)
this is my hacked up makefile for windows. I used VC++
express(i.e. VC8), should work with VC9 too.
--- glen worstell <glen@worstell.com> wrote:
>
> wanted: hints on compiling lpeg for windows. I'm
> trying to use msys/mingw,
> and am getting lots of undefined reference messages
> such as:
> undefined reference to `lua_tolstring'
>
> I suspect I need some linker option to look in the
> lua dll for these
> references?
>
>
>
> --
> View this message in context:
>
http://www.nabble.com/compiling-lpeg-for-windows-tp16509778p16509778.html
> Sent from the Lua - General mailing list archive at
> Nabble.com.
>
>
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
#change according to your installation
LUA_INC=c:\lua5.1\include
LUA_LIB=c:\lua5.1\lua5.1.lib
LUA=c:\lua5.1\lua.exe
MYNAME=lpeg
#no need to modify things below
T=$(MYNAME).dll
OBJS=$(MYNAME).obj
CC=cl.exe
LINK=link.exe
MT=mt.exe
#CFLAGS = /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DLUA_LIB /DLUA_BUILD_AS_DLL
CFLAGS = /MT /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DLUA_LIB /DLUA_BUILD_AS_DLL
.c.obj:
$(CC) /Fo$@ $(CFLAGS) /I$(LUA_INC) $<
build: $T test
$T: $(OBJS)
$(LINK) /dll /out:$@ $(OBJS) $(LUA_LIB)
$(MT) -nologo -outputresource:"$@;2" -manifest "$@.manifest"
clean:
del *.obj
del *.dll
del *.manifest
test: test.lua re.lua $T
$(LUA) test.lua