单声道 mkbundle 窗口 [英] mono mkbundle windows

查看:34
本文介绍了单声道 mkbundle 窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 cygwin 上使用了 mono mkbundle 来编译一个 dot net 应用程序,它工作正常.我使用了此处的说明 c# cywgwin mono mkbundle windows 7 - 不能编译文件

I've used mono mkbundle on cygwin, to compile a dot net app, and it works fine. I used the instructions from here c# cywgwin mono mkbundle windows 7 - cannot compile file

除非以下文件(从 mono/bin 复制)文件夹与应用程序位于同一文件夹中,否则完成的应用程序将不会运行:mono.dll、libglib-2.0-0.dll、libgthread-2.0-0.dll, zlib.dll

The finished app will not run unless the following files (copied from the mono/bin) folder are in the same folder as the app: mono.dll, libglib-2.0-0.dll, libgthread-2.0-0.dll, zlib.dll

这一切似乎都很好 - 但是如果我运行命令(来自 cygwin)

This all seems ok - however if I run the command (from cygwin)

$ objdump -p mycompiledapp.exe |grep "DLL 名称"
(其中mycompiledapp.exe"是应用程序的名称)

$ objdump -p mycompiledapp.exe | grep "DLL Name"
(where "mycompiledapp.exe" is the name of the app)

文件 mono.dll、libglib-2.0-0.dll、libgthread-2.0-0.dll 已经嵌入到我的应用程序中.

The files mono.dll, libglib-2.0-0.dll, libgthread-2.0-0.dll are already embedded in my app.

为什么这些文件需要与我的应用位于同一文件夹中才能运行,而这些文件已经嵌入到我的应用中?

Why do these files need to be in the same folder as my app for it to function, when they are already embedded within my app?

我在编译的时候是不是做错了什么?

Have I done something incorrect when compiling?

有没有办法:
a) 不在我的应用程序中嵌入这些程序集(以便它们可以与它一起分发)
b)编译我的应用程序,使其知道这些程序集嵌入在应用程序中,并使用它们?(并且不必与应用程序一起分发这些文件)

Is there any way to either:
a) Not embed these assemblies in my app (so they can be distributed with it)
b) Compile my app so it knows these assemblies are embedded in the app, and use those? (and not have to distribute these files with the app)

当这些文件已经嵌入其中时,将这些文件与我的应用程序一起分发似乎很痛苦!(特别是考虑到这些程序集的大小 - 一个 50k dot net 应用程序作为一个编译后的单应用程序变成了大约 5megs,这需要与额外的 4megs 程序集一起分发才能运行......e)

It just seems a pain to distribute these files with my app, when they are already embedded within it! (Especially considering the size of these assemblies - a 50k dot net app becomes around 5megs as a compiled mono-app, and this needs to be distributed with an additional 4 megs of assemblies for it to function...e)

感谢您提供任何信息,

史密斯

推荐答案

您可以在运行mkbundle时添加--static标志.请注意,这将嵌入 LGPL 的 Mono 库 (mono.dll).至于 libglib 和 libgthread,您应该找到它们的静态版本并在链接时使用它.请注意,在您的程序中嵌入 LGPL 库具有其他 含义.

You can add the --static flag when running mkbundle. Note that this will embed the Mono library (mono.dll) which is LGPL. As for libglib and libgthread, you should find a static version of them and use that when linking. Note that embedding LGPL libraries in your program will have other implications.

这篇关于单声道 mkbundle 窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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