Dear list members,
I am using a Windows-XP box with Ruby 1.8.6 installed with the
I am trying to get a simple example of a C extension to Ruby to compile
I’m trying to get recipe 22.1 in the Ruby Cookbook to work but I am
having trouble with the “make” step.
As per the recipe I’ve created an extconf.rb
And also the simple example.c in the book
static VALUE rb_mExample;
static VALUE rb_cClass;
print_string(VALUE class, VALUE arg)
rb_mExample = rb_define_module(“Example”);
rb_cClass = rb_define_class_under(rb_mExample, "Class", rb_cObject); rb_define_method(rb_cClass, "print_string", print_string, 1);
I then run extconf.rb which creates the Makefile for me.
But when I then run make I get the error:
target pattern contains no ‘%’ stop
I’ve done some searching on the internet and it appears that other
people have had this error and it seems to be that this error occurs
because “make” doesn’t recognize dos path names anymore . I saw a note
that this is only since make 1.80 and that 1.79 works but I tried make
1.79 and I still get the error. I’ve tried this with “make” from MinGW,
MinGW Msys, and also with “make” from Cygwin but I still get the error.
I haven’t seen anywhere on the internet how to fix this problem. Does
anyone know how I can get “make” to work? Perhaps modifying mkmf.rb or
editting the Makefile it creates?