使用 mkbundle(mono) 编译 Simple Winforms Application 时出现异常
本文关键字:Application 异常 Winforms Simple mkbundle mono 编译 使用 | 更新日期: 2023-09-27 18:34:32
我试过使用mkbundle --deps f.exe -o d.exe
但会引发异常
我收到以下错误
embedding: I:'f.exe
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'mscorlib.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'Mono.Security.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Configuration.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Xml.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Security.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Windows.Forms.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Drawing.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'Accessibility.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'Mono.WebBrowser.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'Mono.Posix.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Data.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'Mono.Data.Tds.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.Transactions.dll
embedding: C:'PROGRA~2'MONO-2~1.8'lib'mono'4.0'System.EnterpriseServices.dll
Compiling:
as -o temp.o temp.s
Unhandled Exception: System.ComponentModel.Win32Exception: ApplicationName='sh',
CommandLine='-c "as -o temp.o temp.s "', CurrentDirectory=''
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartIn
fo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown
>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInf
o startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>
:0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo start
Info) [0x00000] in <filename unknown>:0
at MakeBundle.Execute (System.String cmdLine) [0x00000] in <filename unknown>:
0
at MakeBundle.GenerateBundles (System.Collections.ArrayList files) [0x00000] i
n <filename unknown>:0
at MakeBundle.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Win32Exception: Applica
tionName='sh', CommandLine='-c "as -o temp.o temp.s "', CurrentDirectory=''
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartIn
fo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown
>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInf
o startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>
:0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo start
Info) [0x00000] in <filename unknown>:0
at MakeBundle.Execute (System.String cmdLine) [0x00000] in <filename unknown>:
0
at MakeBundle.GenerateBundles (System.Collections.ArrayList files) [0x00000] i
n <filename unknown>:0
at MakeBundle.Main (System.String[] args) [0x00000] in <filename unknown>:0
有人可以帮我吗?
EDIT:
当我直接从 Cygwin 的 Windows 使用 mkbundle 时,发生了上述错误,我收到以下错误
'as' command not found
从网上我了解到'as'是一个编译器,我在哪里可以得到它,请帮助我我不是Linux爱好者
你需要使用类Unix工具链(如Cygwin(中的mkbundle。
您必须在Cygwin中安装gcc
,gcc-mingw
和as
软件包。
这是来自 mkbundle 的手册页。