problem with swig & ruby

S

serialhex

[Note: parts of this message were removed to make it a legal post.]

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
 
S

serialhex

[Note: parts of this message were removed to make it a legal post.]

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

Ralf Mueller

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top