I don't remember the exact steps (once done then forget ), but I downloaded the mingw installer version of the one click installer from the links in
http://groups.google.com/group/comp.lan ... 1e3b?tvc=1
I made ruby from that and then used that to create the makefile using 'ruby extconf.rb'. I actually made a Netbeans C project to do the rest (using the makefile just created), but you should be able to type 'make' from the command line. The version of chipmunk.so created works with the standard one-click-installer version of Ruby as well.
Ruby library?
-
- Posts: 2
- Joined: Tue Apr 15, 2008 1:57 pm
- Contact:
Re: Ruby library?
Indeed it does:rjs wrote:The version of chipmunk.so created works with the standard one-click-installer version of Ruby as well.
Code: Select all
require 'chipmunk'
include CP
space = Space.new
space.gravity = Vec2.new(0, -100)
radius = 10.0
body = Body.new(10.0, moment_for_circle(15.0, 0.0, radius, Vec2.new(0, 0)))
ball = Shape::Circle.new(body, radius, Vec2.new(0, 0))
space.add_body(body)
5.times do
space.step(1.0 / 60.0)
puts body.p
end
Code: Select all
( 0.000, -0.028)
( 0.000, -0.083)
( 0.000, -0.167)
( 0.000, -0.278)
( 0.000, -0.417)
Who is online
Users browsing this forum: No registered users and 24 guests