Subject:
[ruby-ffi] Glib with threads
From:
Christoph Kappel
Date:
12/12/09 7:34 AM
To:
ruby-ffi

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.