extconf.rb

How do I make Ruby Gems installations on Windows use MinGW for making and compiling?

Trying to update some gems on a Windows machine and I continually get this error output for gems that do not have pre-compiled binaries: Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt...

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I've a project with two extension modules, foo.so and bar.so which currently live in their own subdirectories like so: myproject/ext/foo/extconf.rb myproject/ext/foo/foo.c myproject/ext/foo/foo.h myproject...

How does one write extconf.rb files when one extension includes header files from another?

This is a follow-up question for: Multiple Ruby modules under one directory What happens if these extensions include each other? For example, you have the following structure: ext/foo ext/bar In ext/bar/bar.h, you have a #include "foo.h" foo.h and foo.cpp compile to form foo.o, to make life a little more complicated. Finally, it ...

How would I instruct extconf.rb to use additional g++ optimization flags, and which are advisable?

I'm using Rice to write a C++ extension for a Ruby gem. The extension is in the form of a shared object (.so) file. This requires 'mkmf-rice' instead of 'mkmf', but the two (AFAIK) are pretty similar. By default, the compiler uses the flags -g -O2. Personally, I find this kind of silly, since it's hard to debug with any optimization en...