Reputation: 1035
I'm trying to compile a simple "Hello World" ruby script to a Mac OS binary using macrubyc. This is the command I'm using:
macrubyc -C hello_world.rb
This is the output of the file
command:
file hello_world.rbo
hello_world.rbo: Mach-O 64-bit bundle x86_64
However, when I try to run the created binary, I get ./hello_world.rbo: cannot execute binary file
PS: The hello_world.rb script contains just a single line:
puts "Hello World!"
Upvotes: 0
Views: 192
Reputation: 17833
You are not linking your program. Invoke macrubyc like this:
macrubyc -o hello_word hello_world.rb
When you run macruby -C
it creates an object file which has to be linked in order to be executed.
Upvotes: 2