如何使用LuaInterface在Mono / Linux的 [英] How to use LuaInterface on Mono/Linux

查看:303
本文介绍了如何使用LuaInterface在Mono / Linux的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图在Linux上使用 LuaInterface 在Mono(单声道使用2.0在Ubuntu 9.04)我得到以下异常:

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.

根据本网站 LuaInterface的可以的与单用。 纽约现代艺术博物馆太说。

According to this web site LuaInterface can be used with Mono. MoMA says that too.

是否有可能重新编译 lua51.dll ,使其兼容单?

Is it possible to recompile lua51.dll to make it compatible to Mono?

推荐答案

LuaInterface看起来是纯C#,但它采用的是的混合模式的C ++ / CLI-指明分数的Windows版本的原生版本Lua的库,它融合.NET code和原生32位Windows code。有没有C ++ / CLI编译器为平台的Windows以外的,所以你不能端口/编译的C ++ / CLI code,但它应该工作单上的Win32(或者葡萄酒)。

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)..

唯一真正可行的办法得到这个工作在Mono将使其使用C ++ / CLI P /调用istead。然后,您可以使用 dllmap 这样,当单尝试解析的P / Invoke调用lua51.dll,它会被重定向到Linux等价,liblua.so.5.1。

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.

这篇关于如何使用LuaInterface在Mono / Linux的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆