试图运行单声道捆绑程序,但缺少libgdiplus异常

gen*_*uba 1 mono gdi+ mkbundle

我目前正在尝试让我的C#程序在Linux上运行.在我的Linux机器上使用mono,程序运行正常.所以我使用了mkbundle,所有这些都是正确编译的.但是当我尝试在任何其他Linux机器上运行捆绑的程序时,我收到此错误:

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the 
type initializer for System.Windows.Forms.XplatUI ---> 
System.TypeInitializationException: An exception was thrown by the type initializer for 
System.Drawing.GDIPlus ---> System.DllNotFoundException: libgdiplus.so.0
Run Code Online (Sandbox Code Playgroud)

这是我使用的mkbundle命令:

mkbundle --static program.exe --deps -o a.out
Run Code Online (Sandbox Code Playgroud)

我也尝试过使用mkbundle2而没有运气.

我想也许有一种方法可以专门包含mkbundle的库(比如告诉在哪里找到libgdiplus).它应该在我使用mkbundle时链接,但我想这不是因为当我在任何其他Linux机器上运行我的程序(不运行单声道)时,我收到此错误.

两台机器都运行Ubuntu 10.10 AMD64.

小智 6

windos的mono 3.0配置文件在libgdiplus引用中有错误的条目.

更改文件C:\ Program Files(x86)\ Mono-3.0.2\etc\mono\config的两行,如下所示:

 <dllmap dll="gdiplus" target="/tmp/install/lib/libgdiplus.so" os="!windows"/>
 <dllmap dll="gdiplus.dll" target="/tmp/install/lib/libgdiplus.so" os="!windows"/>
Run Code Online (Sandbox Code Playgroud)