> I'm using the mkmf module to create a Makefile for a C extension I'm > writing. Unfortunately, when I create the Makefile using > 'create_makefile('foo')' in extconf.rb, the following line gets > written out: > > LIBS = -L. -l$(RUBY_INSTALL_NAME) -lc > > This has the effect that my tiny piece of code is linked against > libruby, which has the effect of making it unnecessarily huge. How can > I stop mkmf from adding '-l$(RUBY_INSTALL_NAME)' to LIBS? Well, you *have* to link your extension against the Ruby library so that it can resolve your calls to functions like rb_define_method() et al. But I would guess that you're linking against the static library (libruby.a) instead of the shared library (libruby.so)? If so you need to go back and configure the Ruby build to use a shared library instead, i.e. ./configure --enable-shared make make install Hope this helps, Lyle