Subject: [ruby-ffi] SYNOPSIS' code of http://github.com/ffi/ffi |
From: "KISHIMOTO, Makoto" <ksmakoto@dd.iij4u.or.jp> |
Date: 3/24/10 8:45 PM |
To: ruby-ffi@googlegroups.com |
Hello, I've tried SYNOPSIS' code of http://github.com/ffi/ffi . #==== require 'ffi' module MyLib extend FFI::Library ffi_lib 'c' # insert this line attach_function :puts, [ :string ], :int end MyLib.puts 'Hello boys using libc!' #==== Without "ffi_lib 'c'", following error occured. /usr/local/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi/library.rb:79:in `ffi_libraries': no library specified (LoadError) from /usr/local/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi/library.rb:106:in `attach_function' The SYNOPSIS' code correct? To unsubscribe from this group, send email to ruby-ffi+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.