When I try to use LuaInterface on Mono on Linux (using Mono 2.0 on Ubuntu 9.04) I get the following exception:
** (App.exe:8599): WARNING **: Method ':.DoDllLanguageSupportValidation ()' in assembly '/home/ulrich/test/Debug/lua51.dll' contains native code that cannot be executed by Mono on this platform. The assembly was probably created using C++/CLI.
According to this web site LuaInterface can be used with Mono. MoMA says that too.
Is it possible to recompile lua51.dll
to make it compatible to Mono?
LuaInterface looks to be pure C#, but it uses a mixed mode C++/CLI-ified version of the Windows version of the native Lua library, that mixes .NEt code and native 32-bit Windows code. There's no C++/CLI compiler for platforms other than Windows, so you can't port/recompile the C++/CLI code, though it should work on Mono on Win32 (or maybe Wine)..
The only really viable way to get this to work on Mono would be to make it use P/Invokes istead of C++/CLI. You could then use a dllmap so that when Mono tries to resolve the P/Invoke calls to lua51.dll, it is redirected to the Linux equivalent, liblua.so.5.1.
Older versions of LuaInterface use a pure P/Invoke wrapper. You could use this.
There are also a few attempts at alternatives, my own included. http://github.com/jsimmons/LuaSharp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With