gpt4 book ai didi

.net - 在 Mac OS X 雪豹上运行 mono 2.10.2 mkbundle 时出现问题

转载 作者:行者123 更新时间:2023-12-03 01:01:26 24 4
gpt4 key购买 nike

This page有关于带有 mkbundle 的 bundle 的信息,但是当我尝试在 Mac 上使用它时,收到此错误消息。

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]

来自 this site ,我可以运行 export AS="as -arch i386" 来得到另一个错误。

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]

我看到这是32位/64位编译问题,那么如何删除此错误消息?我尝试使用 export CC="cc -arch i386",但它不起作用。

最佳答案

我必须采取以下步骤。

  1. 导出 AS="as -arch i386"
  2. 导出 CC="cc -arch i386"
  3. 在没有 --static 选项的情况下运行。只需运行 mkbuild BINARY 即可。使用选项--deps,似乎嵌入了更多的dll。您可以使用 -z 选项来压缩嵌入式库。

您可以从this获得更多提示,和 this 。 Mono 的 mkbundle 在 this 中有解释。 .

关于.net - 在 Mac OS X 雪豹上运行 mono 2.10.2 mkbundle 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6442223/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com