----- Original Message -----
From: "Tacvek" <[EMAIL PROTECTED]>
To: <enigma-devel@nongnu.org>
Sent: Sunday, July 23, 2006 2:07 PM
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows
----- Original Message -----
From: "Ronald Lamprecht" <[EMAIL PROTECTED]>
To: "Tacvek" <[EMAIL PROTECTED]>
Cc: <enigma-devel@nongnu.org>
Sent: Sunday, July 23, 2006 3:19 AM
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows
I can try. Unfortunately this means that we would be deviating from
a normal Lua static library, which Debian will not appreciate.
Why should Debian not appreciate Enigma using C++ exceptions in Lua on
Windows compilations?
If the changes limit to the header includes like
extern "C" {
#include "lualib.h"
#include "tolua++.h"
}
we should be able to limit the Lua C++ compilation to Windows/MinGW.
Well of course, there is more to it then that.
First of all Such a change is difficult to limit to MinGW.
I have a basic patch. It comments out the 'extern "C"' c lines,
and explicitly compiles the lib-src/lua directory as C++ code.
I had to disable building tools, as tolua++'s executable
would not compile cleanly as c++. And it would not link cleanly to
a C++ liblua.
Ok. I just got an Enigma version to work correctly with a C++ lua build. :D
Works correctly as in does not crash on any of those tests.
There are a few potential problems. I needed to disable the building of the
tolua++ utility.
This should not be too big a problem, as when cross-compiling, the tolua
utility is
not useful anyway. I also had to make a few changes to files that don't
really belong to Enigma,
namely luaconf.h and tolua++.h. I see no alternative to editing these files.
Now, libtolua++ (as part of liblua) is also compiled in C++, but the header
exports all symbols in
C format so Enigma does not notice the change.
So, if you want a patch that has lua as C++ for mingw32, let me know.
(The patch is complete, and should not have any effect on builds other than
MINGW32.)
It may be a better idea to add an optional feature to our configure script
called cxx-lua, which
could be enabled or disabled with "--enable-cxx-lua" and
"--disable-cxx-lua", and simply
have mingw32 default to enabled. It seems somewhat cleaner.
If you would prefer that patch, I will have no trouble providing it.
_______________________________________________
Enigma-devel mailing list
Enigma-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/enigma-devel