3

Even though I can compile and run a simple hotcocoa code by doing , it won't rake auto-generated hotcocoa code. I'm running Mac OS X Lion and XCode for Lion (I'm not even using XCode for hotcocoa, though.)

Any solution for this?

$ 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
Paul R
  • 208,748
  • 37
  • 389
  • 560
user292071
  • 81
  • 1
  • 1
  • 3

1 Answers1

3

I had this problem in Snow Leopard as well. My in-elegant and hack solution was to edit my copy of the hotcocoa gem and remove the reference to the i386 architecture.

in the $GEM_FOLDER/lib/hotcocoa/application_builder.rb I changed line 215:

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

to:

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

I've since read that if you install this version of the hotcocoa gem this change gets made for you, but I haven't tried it so I can't say for sure.

rm-rf
  • 1,313
  • 1
  • 15
  • 24