The problem was to access G-WAN C API from Ruby
so i tried to use FFI, but gwan doesn't have any library, when i tried to load the binary, it shows:
/home/asd/.gem/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb:123:in `block in ffi_lib': Could not open library '/home/asd/bin/gwan_linux32-bit/gwan': /home/asd/bin/gwan_linux32-bit/gwan: cannot dynamically load executable (LoadError)
from /home/asd/.gem/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `map'
from /home/asd/.gem/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `ffi_lib'
from /home/asd/bin/gwan_linux32-bit/127.0.0.1_8081/#127.0.0.1/csp/test.rb:26:in `<module:MyLibrary>'
from /home/asd/bin/gwan_linux32-bit/127.0.0.1_8081/#127.0.0.1/csp/test.rb:24:in `<main>'
because, obviously, it's not the library, it's the executable binary
at first i think that i should make an C-extension for Ruby to access G-WAN API, but to think of it, it would also fail if we have no .o to link (only .h provided), right?
so.. is it possible to make Ruby's FFI to load from .h instead from dll?