Page 1 of 2

Ruby library?

Posted: Thu Jan 03, 2008 11:43 am
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!

Re: Ruby library?

Posted: Thu Feb 28, 2008 1:28 am
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?

Re: Ruby library?

Posted: Thu Feb 28, 2008 3:26 am
by Blue Prawn
If you have problems with Cygwin, perhaps you will be more lucky with http://www.mingw.org/

Re: Ruby library?

Posted: Thu Feb 28, 2008 3:27 am
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

Re: Ruby library?

Posted: Thu Feb 28, 2008 5:15 pm
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?

Re: Ruby library?

Posted: Fri Mar 14, 2008 10:36 am
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.

Re: Ruby library?

Posted: Sat Mar 15, 2008 4:21 pm
by Pipo
This may be usable, but I didn't managed to make a correct ruby extension...

Re: Ruby library?

Posted: Tue Mar 25, 2008 12:24 pm
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.

Re: Ruby library?

Posted: Wed Mar 26, 2008 2:52 pm
by Pipo
Thank you very much, it work very well.

Re: Ruby library?

Posted: Tue Apr 15, 2008 2:10 pm
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?