[Kde-bindings] QtRuby: Init_qtruby4 not called

Arno Rehn arno at arnorehn.de
Sun Sep 16 18:48:38 UTC 2007


Am Sonntag 16 September 2007 16:56:38 schrieb Richard Dale:
> On Sunday 16 September 2007, Arno Rehn wrote:
> > Hi,
> >
> > as qyoto is can now completely cope with a modular smoke, I tried to port
> > qtruby4, too. But I can't even start a tutorial, I get the following
> > error:
>
> That would be really good - I must try and help you out. I haven't done a
> lot recently as I've had back and arm trouble and have been trying to avoid
> typing too much.
Oh, get well soon, then.

> > /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2561:in `initialize':
> > undefined method `addMetaObjectMethods' for Qt::Internal:Module
> > (NoMethodError) from /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:48:in
> > `new' from /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:48:in `signals'
> > from ./lcdrange.rb:3
> >         from ./gamebrd.rb:1:in `require'
> >         from ./gamebrd.rb:1
> >         from t14.rb:5:in `require'
> >         from t14.rb:5
> >
> > It seems to me as if Init_qtruby4 is never called. I don't know very much
> > about ruby, so how is it supposed to be called?
>
> In your qtruby program there should be a require
>
> require 'Qt'
>
> That will load 'Qt.rb' in the top level /usr/lib64/ruby/site_ruby/1.8/
> directory. That should then load the C extension 'qtruby4.so' with the
> Init_qtruby4() call in it, and inside that function there is an
> rb_require() call to load the 'Qt/qtruby4.rb' source in turn.
Ah, ok. There was only a symlink installed 
in /usr/lib64/ruby/site_ruby/1.8/x86_64, but not the whole library. After 
copying the library over from the build directory, it worked fine. Seems like 
there is a mistake in one of the CMake files since only a symlink is 
installed.


-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list