Carlos Lucas

Carlos Lucas

  • NA
  • 1
  • 813

Problem with SafeNativeMethods on Linux

Mar 23 2015 4:36 PM
Hi,

I have a problem calling the class SafeNativeMethods. I use MonoDevelop on Ubuntu 14.04 and I built the OpenNI library from its GitHub, then I wrote a program that references the dll generated by the build ( OpenNI.net.dll ) and It works fine.

Now, the problem: I'm using Unity3d. I installed it through Wine and PlayOnLinux. Unity engine accepts c# programs, so I wrote one that references OpenNI library. It compiles well, but when it is executed a DllNotFoundException is thrown. I think it is because of SafenativeMethods class. I know it founds OpenNI.net.dll because I can make instances of enumerated classes and it works, but when I call a method that uses SafeNativeMethods class like the constructor of EnumerationErrors that Exception is thrown. 

Is that class a native class of C#? May I forget install some system libraries on wine?

Thank you!