From: Paul Brannan Date: 2008-10-02T00:41:33+09:00 Subject: Re: Multiple C-Extensions with mkmf On Tue, Sep 23, 2008 at 06:59:06PM +0900, Matthew B Gardner wrote: > Hello -- > I was wondering if there's a way to separate multiple C-extension classes > into separate files but still be able to directly call functions (C-style > calls)? I currently have a bunch of classes in one file for the performance > boost of direct calls over ruby function calls (not Ruby-ish, I know, but the > boost was significant), but the sloppiness isn't very appealing, especially > as the file continues to grow. Hopefully there's a solution that will allow > me to separate the classes without hindering performance? Ruby loads extensions with RTLD_GLOBAL, so you should be able to access exported symbols in another extension if you require that extension using rb_require(). Paul