Ruby library?

Official forum for the Chipmunk2D Physics Library.
Pipo
Posts: 13
Joined: Thu Jan 03, 2008 11:27 am
Contact:

Ruby library?

Post by Pipo »

I have to say, Chipmunk physics is really amazing! I tried it's Ruby binding and i really enjoyed it.
But I am on Windows and I don't now how to use the Makefile created by extconf.rb :oops:
I tried Unxutils and Cygwin, but it didn't worked (maybe I don't really know how to use them).
How can I get a chipmunk.so file from the source code of the last version?
(I have found on the web a chipmunk.so file, so I can use Chipmunk basics functions, but it is an older version.)

Thanks a lot!
Skellt
Posts: 2
Joined: Thu Feb 28, 2008 1:23 am
Contact:

Re: Ruby library?

Post by Skellt »

I too would like to know what the best windows make tool would be to download to build the ruby bindings of Chipmunk. The README just says:
Ruby: I maintain a Ruby extension for Chipmunk. To build it, run
'ruby extconf.rb' then 'make' from inside the ruby directory.
I'm a ruby guy, not a "make" guy, so can someone provide a brief tutorial on how to execute this seemingly simple second step?
Blue Prawn
Posts: 22
Joined: Thu Jan 03, 2008 1:36 pm
Contact:

Re: Ruby library?

Post by Blue Prawn »

If you have problems with Cygwin, perhaps you will be more lucky with http://www.mingw.org/
Blue Prawn
Posts: 22
Joined: Thu Jan 03, 2008 1:36 pm
Contact:

Re: Ruby library?

Post by Blue Prawn »

Skellt wrote:I'm a ruby guy, not a "make" guy, so can someone provide a brief tutorial on how to execute this seemingly simple second step?
http://www.mingw.org/mingwfaq.shtml#faq-Makefile
Skellt
Posts: 2
Joined: Thu Feb 28, 2008 1:23 am
Contact:

Re: Ruby library?

Post by Skellt »

Thanks for the help guys, but it appears that I remember nothing about my old C/C++/make days and am quite probably hopeless.

Here's what I've tried:

1) I downloaded the auto installer for MingW and installed it.
2) cd into the chipmunk/ruby folder and ran "ruby extconf.rb" to make the Makefile
3) ran mingw32-make.exe in the same folder and got this error:
makefile:126: *** target pattern contains no `%'. Stop.

4) googled that a bit and found nothing useful, but saw some info about how mingw likes to work with msys (a cygwin like shell) so I install and run that. Rerun extconf.rb to build a new msys friendly Makefile and then run mingw32-make.exe again. Same error.
5) Open the makefile to see if I remember anything from my old make days. line 126 (and 127) looks like this:

{$(topdir)}.cc{}.obj:
$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

Looks like gibberish to me. I check on topdir and it's set to f:/ruby/lib/ruby/1.8/i386-mswin32. Is it trying to build .cc files in my ruby folder? First, there aren't any, and second that doesn't make any sense.

Gave up. Does this go smoothly for anyone else on Windows?
rjs
Posts: 3
Joined: Fri Mar 14, 2008 10:31 am
Contact:

Re: Ruby library?

Post by rjs »

It would be really great if someone could produce and make available either a .so or .dll of the Ruby binding with Chipmunk for Windows. The old version from the Shattered guys didn't have all of the functions that I need; in particular the accessors for "group" in the Shape class.
Pipo
Posts: 13
Joined: Thu Jan 03, 2008 11:27 am
Contact:

Re: Ruby library?

Post by Pipo »

This may be usable, but I didn't managed to make a correct ruby extension...
rjs
Posts: 3
Joined: Fri Mar 14, 2008 10:31 am
Contact:

Re: Ruby library?

Post by rjs »

I have finally managed to produce a Ruby Chipmunk library of the current version which runs with the one-click installer version of Ruby. You should be able to find it at ftp://ftp.cs.auckland.ac.nz/pub/staff/r ... hipmunk.so. Thanks to Luis Lavena and his work on the MinGW version of the one-click installer.
Pipo
Posts: 13
Joined: Thu Jan 03, 2008 11:27 am
Contact:

Re: Ruby library?

Post by Pipo »

Thank you very much, it work very well.
jaymcgavren
Posts: 2
Joined: Tue Apr 15, 2008 1:57 pm
Contact:

Re: Ruby library?

Post by jaymcgavren »

rjs wrote:I have finally managed to produce a Ruby Chipmunk library of the current version which runs with the one-click installer version of Ruby.
How did you finally do it - cross compiling from a non-Windows platform like at the link Pipo provided?

http://eigenclass.org/hiki/cross+compiling+rcovrt

Or some other method?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests