Mono mkbundle工具无法创建二进制投诉,输出文件不可用 [英] Mono mkbundle tool unable to create binary with complaint that output file is unavailable

查看:398
本文介绍了Mono mkbundle工具无法创建二进制投诉,输出文件不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此主题的建议运行C#apps sans .NET我使用mono编译了我的应用程序。我使用最新的Visual C#.NET Express Edition构建原始应用程序。它在Windows上运行良好。然后我打开Cygwin并导航到我的源,我再次编译项目,使用以下命令mono:

As per suggestions from this thread on running C# apps sans .NET I've compiled my app using mono. I built the original app using the latest Visual C# .NET Express Edition. It runs fine on .NET on Windows. I then opened up Cygwin and navigated to my source where I compiled the project again, under mono using the following command:

$ mcs <myProjectHere>.cs

这将生成MyProject.exe,可以在Cygwin内运行成功,并且可以从Window命令行成功运行。使用的命令是:

This produces MyProject.exe, which can be run from within Cygwin with success, and can be run from the Window command line successfully. Commands used are:

$ mono MyProject.exe
C:\...>mono MyProject.exe

只是为了踢:

C:\...>MyProject.exe

所有工作按预期。然后我尝试使用mkbundle命令将单声道编译的可执行文件构建为静态链接的二进制文件如下:

All work as expected. I then tried to build the mono compiled executable into a statically linked binary using the mkbundle command as follows:

$ mkbundle -o MyProject MyProject.exe --deps

这是开始下坡的地方。它开始足够好,然后抱怨,输出文件(大概,MyProject.exe)无法打开,因为它很忙。它的完整输出在这里:

This is where things begin to go downhill. It starts off well enough and then complains that the output file (presumably, MyProject.exe) cannot be opened because it is busy. The full output of it all is here:


    $ mkbundle -o Program Program.exe --deps
    OS is: Windows
    Sources: 1 Auto-dependencies: True
       embedding: c:\Documents and Settings\bsweeney\My Documents\Visual Studio 2008
    \Projects\TestConsole\TestConsole\Program.exe
       embedding: C:\PROGRA~1\Mono-2.2\lib\mono\2.0\mscorlib.dll
    Compiling:
    as -o temp.o temp.s
    gcc -mno-cygwin -g -o Program -Wall temp.c `pkg-config --cflags --libs mono|dos2
    unix`  temp.o
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/bin/ld: cannot op
    en output file Program.exe: Device or resource busy
    collect2: ld returned 1 exit status
    [Fail]

我的unix gcc工具链安装和在良好的条件,因为我已经能够成功地编译几个c ++应用程序在eclipse中使用它最近(虽然我应该是开放的任何数量的问题...)。

I claim that my unix gcc toolchain is installed and in good condition because I've been able to successfully compile a few c++ apps in eclipse using it recently (although i supposed i should be open to any number of problems...).

任何人都遇到过这样的事情?我很难...

Anyone ever run into anything like this? I'm stumped...

推荐答案

看起来它试图输出到 MyProject.exe ,与输入文件相同。

It seems like it's trying to output into MyProject.exe, which is the same as the input file.

尝试运行

$ mkbundle -o ProgramOutput Program.exe --deps

顺便说一句,因为我不知道 mkbundle

This is just a guess, by the way, since I don't know mkbundle.

这篇关于Mono mkbundle工具无法创建二进制投诉,输出文件不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆