An issue when running mono 2.10.2 mkbundle on Mac OS X snow leopard(在 Mac OS X 雪豹上运行单声道 2.10.2 mkbundle 时出现问题)
问题描述
此页面包含有关带有 mkbundle
的捆绑包的信息,但是当我尝试在 Mac 上使用它时,我收到了这个错误消息.
This page has info about Bundles with mkbundle
, but when I tried to use it on Mac, I got this error message.
delegate> mkbundle delegate.exe -o delegate
OS is: Darwin
Sources: 1 Auto-dependencies: False
embedding: /Users/smcho/Desktop/csharp/delegate/delegate.exe
Compiling:
as -o temp.o temp.s
temp.s:2:unknown section type: symbol_stubs
temp.s:2:Rest of line ignored. 1st junk character valued 112 (p).
[Fail]
从 这个站点,我可以运行 export AS="as -arch i386"
得到另一个错误.
And from this site, I could run export AS="as -arch i386"
to get another error.
Compiling:
as -arch i386 -o temp.o temp.s
cc -g -o a.out -Wall temp.c `pkg-config --cflags --libs mono-2` temp.o
ld: warning: ignoring file /Library/Frameworks/Mono.framework/Versions/2.10.2/lib/libmono-2.0.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: ignoring file temp.o, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_mono_register_bundled_assemblies", referenced from:
_mono_mkbundle_init in cczw6Dmo.o
"_mono_set_dirs", referenced from:
_main in cczw6Dmo.o
"_mono_main", referenced from:
_main in cczw6Dmo.o
"_assembly_data_ser_exe", referenced from:
_assembly_bundle_ser_exe in cczw6Dmo.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
[Fail]
我看到这是32bit/64bit编译的问题,那么如何去除这个错误信息呢?我尝试使用 export CC="cc -arch i386"
,但它不起作用.
I see this is a problem of 32bit/64bit compilation issue, then how to remove this error message? I tried with export CC="cc -arch i386"
, but it doesn't work.
推荐答案
我必须采取以下步骤.
- export AS="as -arch i386"
- export CC="cc -arch i386"
- 在没有
--static
选项的情况下运行.只需运行mkbuild BINARY
.使用 --deps 选项,它似乎嵌入了更多的 dll.您可以使用 -z 选项压缩嵌入式库.
- export AS="as -arch i386"
- export CC="cc -arch i386"
- Run without
--static
option. Just runmkbuild BINARY
. With the option --deps, it seems to embed more dlls. You can use -z option to zip the embedded libraries.
您可能会从 this 和 这个.Mono 的 mkbundle 在 this 中有说明.
You may get more hints from this, and this. Mono's mkbundle is explained in this.
这篇关于在 Mac OS X 雪豹上运行单声道 2.10.2 mkbundle 时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Mac OS X 雪豹上运行单声道 2.10.2 mkbundle 时出现问题
基础教程推荐
- SSE 浮点算术是否可重现? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30