Problem with swig & ruby

ok, so i’m working on a project that requires me to use swig to write
some
ruby bindings. unfortunately, when i try and run swig & i give it the
directory of ruby.h it gives me a “ruby/config.h not found” error. i’m
using rvm so i can manage the different versions i’m going to be testing
against, but that shouldnt matter as when i compiled from source it have
me
the same error. i can find config.h, it’s in “i686-linux/ruby” not
“ruby”
(relative to ruby.h). whats the deal with this? i mean i can easily
symlink or copy config.h to the proper place, but i shouldnt have to do
this. and before anyone asks i did configure with --enable-shared. is
this
a bug i need to talk to the head-honchos about?? i would like this
resolved
so i dont have to worry about this when i install other versions of ruby
(or asking people to do this for their version of ruby). i mean, it
kind
of looks bad if i ask someone to symlink something for me (and yes i
could
do it for them in my config scripts, but the whole thing should be
unessisary!)

thanks in advance!
hex

no one has a good (or bad) answer to this? :-/ crap!
hex

37 min of waiting is not that long…get yourself a coffee as a
pacifier
here is my hint:

to get the right value for CPPFLAGS, call this script:

require ‘mkmf’
if RUBY_VERSION[0,3] == ‘1.8’
puts “-I#{Config::expand(CONFIG[‘rubyhdrdir’])}”
else
puts “-I#{Config::expand(CONFIG[‘rubyhdrdir’])}
-I#{Config::expand(CONFIG[‘rubyhdrdir’])}/#{Config::expand(CONFIG[‘arch’])}”
end

On my system, its outpout is
-I/usr/include/ruby-1.9.1 -I/usr/include/ruby-1.9.1/x86_64-linux

Ruby uses two config.h files, one for platform independent and one for
platform dependent settings.

hth
ralf

BTW, there a SWIG mailing list: [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs