[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problems when building C extensions with ruby 1.8.7

Stefano Crocco

6/9/2008 8:11:00 AM

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

1 Answer

richard.j.dale@gmail.com

6/9/2008 10:47:00 AM

0

On Jun 9, 9:11 am, Stefano Crocco <stefano.cro...@alice.it> wrote:
> 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