Subject:
Re: [ruby-ffi] How to call system libraries
From:
Jeremy Voorhis
Date:
10/29/10 11:25 PM
To:
ruby-ffi@googlegroups.com

Hello,

ffi_lib loads dynamic libraries, so you should call it with the name of an object file, and not a header. On recent versions of FFI, you can call ffi_lib('c') to make system calls available.

hth

Jeremy Voorhis

On Fri, Oct 29, 2010 at 5:38 PM, Steve <please-hack-me@hotmail.com> wrote:
I am just leaning FFI and am having problems calling linux network
functions.

In a C file I might do #include <arpa/inet.h>

However, in ruby ffi neither ffi_lib 'arpa/inet' nor ffi_lib 'inet'
works. I can't get socket either.

Any help is appreciated!