MacRuby HotCocoa $ macrake //错误

时间:2011-05-18 09:10:54

标签: xcode xcode4 rake macruby hotcocoa

即使我可以编译并运行一个简单的hotcocoa代码,它也不会耙自动生成的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

1 个答案:

答案 0 :(得分: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的this version,那么这个改变就是为你做的,但是我还没试过,所以我不能肯定地说。