3

即使我可以通过执行编译和运行一个简单的 hotcocoa 代码,它也不会 rake 自动生成的 hotcocoa 代码。我正在为 Lion 运行 Mac OS X Lion 和 XCode(不过,我什至没有将 XCode 用于 hotcocoa。)

有什么解决办法吗?

$ hotcocoa test
$ cd test
$ macrake

(in ./test)
ld: warning: ignoring file /Library/Frameworks//MacRuby.framework/MacRuby, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
  "_macruby_main", referenced from:
      _main in ccjW87h1.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/n7/tw8kvz501jf6w59dhxxnmxbr++++fn/T//ccsIOdx5.out (No such file or directory)

/bin/sh: ./Test.app/Contents/MacOS/Test: No such file or directory
4

1 回答 1

3

我在雪豹中也遇到了这个问题。我不优雅的破解解决方案是编辑我的 hotcocoa gem 副本并删除对 i386 架构的引用。

$GEM_FOLDER/lib/hotcocoa/application_builder.rb我更改了第 215 行:

archs = RUBY_ARCH.include?('ppc') ? '-arch ppc' : '-arch i386 -arch x86_64'

至:

archs = RUBY_ARCH.include?('ppc') ? '-arch ppc' : '-arch x86_64'

我已经读过,如果你安装了这个版本的 hotcocoa gem,这个改变会为你做出,但我还没有尝试过,所以我不能肯定地说。

于 2011-06-08T14:39:31.747 回答