[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problems with MinGW v3.4.5 on WinXP SP2 when luaL_checkxxx() fails
- From: Mike Pall <mikelu-0708@...>
- Date: Wed, 1 Aug 2007 03:59:30 +0200
RJP Computing wrote:
> My system is Windows XP SP2 with MinGW 5.1.2/gcc v3.4.5 and Lua 5.1.2. I am
> not sure if this is a Lua issue or a lack of understanding on my part, so
> please bare with this. Thanks.
It's most likely a problem with the C++ exception mechanism.
GCC (even the MinGW edition) doesn't use the standard Windows
mechanism for exception unwinding. This is because of the Borland
SEH patent. That leaves us with SJLJ or DW2 exceptions. DW2 may
break cross-DLL throws, so better check what your MinGW GCC has
been compiled with (it's not a command line flag).
This mess causes all sorts of trouble when mixing code compiled
with or without exception support, with or without frame
pointers, with or without debug symbols and so on. And of course
when mixing DLLs made by different compilers. Yes, this sucks.
> (I used the binary static library from LuaBinary on LuaForge
Since you've already installed MinGW, you're much better off
compiling Lua yourself. A "make mingw" takes a few seconds.
Try the standard compile first. If this doesn't work then try
adding -fexceptions. Or try compiling Lua with the C++ compiler.
Or compile your C++ code without exception handling. :-)
Some permutation of this will make it work. That is ... until
someone strips the binaries or ... anyway, excuse my rant.