DllNotFoundException when trying to “fix” LuaInterface, but why?

Since my game, which I would really like to be mono-fit, does not seem to work under Linux, because LuaInterface is a jerk (see the corresponding SO thread for more on this), I decided to do what was suggested there. I wrote my own Lua511.LuaDLL class to reflect the one used by LuaInterface, replacing each individual public function with the corresponding DllImport from lua51:

//For example, like this:
[DllImport("lua51")]
public static extern IntPtr luaL_newstate();

With the edited LuaInterface.dll (which now contains its own Lua511.LuaDLL) and the pure Win32 native lua51.dll in my game start folder, I somehow get a DllNotFoundException exception when LuaInterface tries to initialize:

public Lua()
{
   luaState = LuaDLL.luaL_newstate(); //right there, right then.
   ...

, DLL , ? , .Net- lua51.dll, EntryPointNotFoundException. .

?

: Lua511.cs, LuaInterface, , .

: , . . Linux.

+3
2

. Lua.NET. Lua4Net.

Google. .

: ; .

, : Get/set global variables; ,...

Windows DLL ( V++ 9.0 DLL ).

: Linux/Mono, !!!

+4

AFAIK mono Linux .

lua51.dll lua51.so dll DllImport. dllmap.

+1

Source: https://habr.com/ru/post/1720395/


All Articles