Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mono(Linux,C#):在同一文件夹中找不到DLL(System.DllNotFoundException)_C#_Linux_Mono_Raspberry Pi3_Dllimport - Fatal编程技术网

Mono(Linux,C#):在同一文件夹中找不到DLL(System.DllNotFoundException)

Mono(Linux,C#):在同一文件夹中找不到DLL(System.DllNotFoundException),c#,linux,mono,raspberry-pi3,dllimport,C#,Linux,Mono,Raspberry Pi3,Dllimport,我正试图用mono在我的Raspberry Pi 3上运行一个C#程序。程序正确启动,但当我到达使用某些OpenCV库的点时,程序会出现以下错误输出: 未处理的异常: System.TypeInitializationException:“Emgu.CV.CvInvoke”的类型初始值设定项引发异常。-->System.DllNotFoundException:opencv_core220 在(包装器管理为本机)Emgu.CV.CvInvoke:cvRedirectError(Emgu.CV.C

我正试图用mono在我的Raspberry Pi 3上运行一个C#程序。程序正确启动,但当我到达使用某些OpenCV库的点时,程序会出现以下错误输出:

未处理的异常:
System.TypeInitializationException:“Emgu.CV.CvInvoke”的类型初始值设定项引发异常。-->System.DllNotFoundException:opencv_core220
在(包装器管理为本机)Emgu.CV.CvInvoke:cvRedirectError(Emgu.CV.CvInvoke/CvErrorCallback,intptr,intptr)
在:0中的Emgu.CV.CvInvoke..cctor()[0x00023]处
---内部异常堆栈跟踪的结束---
在Emgu.CV.Image`2[TColor,TDepth].AllocateData(System.Int32行,System.Int32列,System.Int32 numberOfChannels)[0x0002e]中:0
在Emgu.CV.Image`2[TColor,TDepth]处,在以下位置设置位图(System.Drawing.Bitmap值)[0x00050]:0
在Emgu.CV.Image`2[TColor,TDepth]…ctor(System.Drawing.Bitmap bmp)[0x00008]中:0
在0中的App.Program.Main(System.String[]args)[0x00122]处
[错误]致命的未处理异常:System.TypeInitializationException:“Emgu.CV.CvInvoke”的类型初始值设定项引发异常。-->System.DllNotFoundException:opencv_core220
在(包装器管理为本机)Emgu.CV.CvInvoke:cvRedirectError(Emgu.CV.CvInvoke/CvErrorCallback,intptr,intptr)
在:0中的Emgu.CV.CvInvoke..cctor()[0x00023]处
---内部异常堆栈跟踪的结束---
在Emgu.CV.Image`2[TColor,TDepth].AllocateData(System.Int32行,System.Int32列,System.Int32 numberOfChannels)[0x0002e]中:0
在Emgu.CV.Image`2[TColor,TDepth]处,在以下位置设置位图(System.Drawing.Bitmap值)[0x00050]:0
在Emgu.CV.Image`2[TColor,TDepth]…ctor(System.Drawing.Bitmap bmp)[0x00008]中:0
在0中的App.Program.Main(System.String[]args)[0x00122]处
提到的库“opencv_core220”是一个dll,与使用mono执行的exe I位于同一目录中。 我能做些什么来解决这个问题? 到目前为止,我从未使用过mono,但我知道你不能在linux上使用DLL,就像在windows上一样,但你必须使用so文件。但我不知道如何从我的DLL中获取它们。
该程序完全可以在windows上运行。

将.dll文件转换为.so文件,并将.so文件添加到/usr/lib。然后运行exe并选中将.dll文件转换为.so文件,并将.so文件添加到/usr/lib。然后运行exe并检查

有使用.net字节码的DLL和使用windows本机代码的DLL。您需要使用Linux本机代码的等效文件

有使用.net字节码的DLL和使用windows本机代码的DLL。您需要使用Linux本机代码的等效文件

请尝试
LD\u LIBRARY\u PATH=$pwd mono yourProgram.exe
LD\u LIBRARY\u PATH=$(pwd)mono yourProgram.exe
尝试
LD\u LIBRARY\u PATH=$(pwd)mono yourProgram.exe
您无法将Windows dll文件转换为so文件!无法将Windows dll文件转换为so文件!