Problems when building C extensions with ruby 1.8.7

S

Stefano Crocco

Hello to everyone. Today, I just tried installing ruby 1.8.7, and now I'm
having problems compiling a C extension for it. In particular, the extension
was svn version of korundum/qt-ruby, which compiled correctly with ruby 1.8.6.
Now, I'm getting this message:

/home/stefano/Desktop/kdebindings/ruby/qtruby/src/Qt.cpp: In function 'VALUE
method_missing(int, VALUE*, VALUE)':
/home/stefano/Desktop/kdebindings/ruby/qtruby/src/Qt.cpp:715: error: invalid
conversion from 'const char*' to 'char*'

The line in question reads:

char * methodName = rb_id2name(SYM2ID(argv[0]));

I thought that ruby-1.8.7 and ruby 1.8.6 had the same C API, but apparently
it's not so. Does anyone know more about similar issue? Should I report it to
the qtruby developers or is it a bug in ruby itself?

Stefano
 
R

richard.j.dale

Hello to everyone. Today, I just tried installing ruby 1.8.7, and now I'm
having problems compiling a C extension for it. In particular, the extension
was svn version of korundum/qt-ruby, which compiled correctly with ruby 1.8.6.
Now, I'm getting this message:

/home/stefano/Desktop/kdebindings/ruby/qtruby/src/Qt.cpp: In function 'VALUE
method_missing(int, VALUE*, VALUE)':
/home/stefano/Desktop/kdebindings/ruby/qtruby/src/Qt.cpp:715: error: invalid
conversion from 'const char*' to 'char*'

The line in question reads:

char * methodName = rb_id2name(SYM2ID(argv[0]));

I thought that ruby-1.8.7 and ruby 1.8.6 had the same C API, but apparently
it's not so. Does anyone know more about similar issue? Should I report it to
the qtruby developers or is it a bug in ruby itself?
Thanks for the bug report, it looks like that function changed from
being a 'char *' to a 'const char *' in Ruby 1.8.7. I've fixed it in
the QtRuby svn now, but haven't had time to actually try building and
testing against 1.8.7 yet.

-- Richard
 

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

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,090
Latest member
ActivlifeKetoDiet

Latest Threads

Top