Subject:
[ruby-ffi] Re: Glib with threads
From:
Christoph Kappel
Date:
12/12/09 9:07 AM
To:
ruby-ffi

Ah, yep you are right. Thanks! :)

On Dec 12, 3:35 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Sat, Dec 12, 2009 at 5:34 AM, Christoph Kappel <unex...@dorfelite.net> wrote:
> > Hello,
>
> > any idea why this doesn't work?
>
> > require "ffi"
>
> > module
> > Glib
> >  extend
> > FFI::Library
> >  ffi_lib "libglib-2.0"
>
> >  attach_function :thread_init, :g_thread_init,
> > [ :pointer ], :void
> > end
>
> > I am getting following error:
>
> > /usr/lib/ruby/gems/1.9.1/gems/ffi-0.4.0/lib/ffi/library.rb:62:in
> > `attach_function': Function 'g_thread_init' not found in
> > [libglib-2.0.so] (FFI::NotFoundError)
> >        from glib.rb:6:in `<module:FFIGlib>'
> >        from glib.rb:3:in `<main>'
>
> > I can use g_thread_init in a C program, I verified this before
> > posting. So this symbol exists in the glib lib.
>
> I think it's defined in libgthread, not libglib.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl
> Chamber of commerce no: 08173483 (The Netherlands)