How to use LuaInterface on Mono/Linux

泄露秘密 提交于 2019-12-05 10:42:25

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

JCH2k

For all of you reading this now: Use KopiLuaInterface! See my post here: https://stackoverflow.com/a/21386450/1070906

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!