while building Lua on windows by mingw491 it gives an undefined reference error. Following is the output:
C:\Users\Alizadeh\Desktop\lua-5.3.0>mingw32-make PLAT=mingw
cd src && mingw32-make mingw
mingw32-make[1]: Entering directory 'C:/Users/Alizadeh/Desktop/lua-5.3.0/src'
mingw32-make "LUA_A=lua53.dll" "LUA_T=lua.exe" \
"AR=gcc -std=gnu99 -shared -o" "RANLIB=strip --strip-unneeded" \
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
mingw32-make[2]: Entering directory 'C:/Users/Alizadeh/Desktop/lua-5.3.0/src'
g++ -c -o lua.o lua.c
g++ -c -o lapi.o lapi.c
g++ -c -o lcode.o lcode.c
.
.
.
g++ -c -o loadlib.o loadlib.c
g++ -c -o linit.o linit.c
gcc -std=gnu99 -shared -o lua53.dll lapi.o lcode.o lctype.o ldebug.o ldo.o ldump
.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o
ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o
ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o
linit.o
ldo.o:ldo.c:(.text+0xe5): undefined reference to `__cxa_allocate_exception'
ldo.o:ldo.c:(.text+0x105): undefined reference to `__cxa_throw'
ldo.o:ldo.c:(.text+0x234): undefined reference to `__cxa_begin_catch'
ldo.o:ldo.c:(.text+0x24c): undefined reference to `__cxa_end_catch'
ldo.o:ldo.c:(.rdata$_ZTIP11lua_longjmp[__ZTIP11lua_longjmp]+0xffff3fb8): undefin
ed reference to `vtable for __cxxabiv1::__pointer_type_info'
C:/Qt/Qt5.4.0/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../.
./i686-w64-mingw32/bin/ld.exe: ldo.o: bad reloc address 0x0 in section `.rdata$_
ZTIP11lua_longjmp[__ZTIP11lua_longjmp]'
collect2.exe: error: ld returned 1 exit status
makefile:59: recipe for target 'lua53.dll' failed
mingw32-make[2]: *** [lua53.dll] Error 1
mingw32-make[2]: Leaving directory 'C:/Users/Alizadeh/Desktop/lua-5.3.0/src'
makefile:116: recipe for target 'mingw' failed
mingw32-make[1]: *** [mingw] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/Alizadeh/Desktop/lua-5.3.0/src'
makefile:55: recipe for target 'mingw' failed
mingw32-make: *** [mingw] Error 2
I'm using mingw (491) on windows7 and I want to link it with Qt.