我在使用DLLImport时应该在哪里放置dll文件?

时间:2013-02-26 09:42:16

标签: c# android monodevelop dllnotfoundexception

我知道在Windows窗体中你只需要将文件放在Debug文件夹中,但似乎它在android的monodev中完全不同。我试过从assets文件夹中放置文件,添加引用路径,从项目设置等设置引用文件夹但我仍然没有运气。我总是得到DLLNotFoundException

另外,下面是导入dll文件的代码

[DllImport("testing.dll", EntryPoint = "Testing_Open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
 public static extern uint Testing_Open(HINSTANCE hInstance);

1 个答案:

答案 0 :(得分:3)

你不能在Mono for Android上使用DllImport .dll,因为它是基于Linux的系统,而不是基于Windows的系统。您需要DllImport一个Linux共享库(* .so)。

相关问题