lua-users home
lua-l archive

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


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