Update example in readme
This commit is contained in:
@@ -13,12 +13,12 @@ Inspired by [Ruby's FFI](https://github.com/ffi/ffi)
|
|||||||
defmodule MyLib do
|
defmodule MyLib do
|
||||||
use FFI.Library
|
use FFI.Library
|
||||||
|
|
||||||
ffi_lib "c"
|
ffi_lib "libstdc++.so.6"
|
||||||
|
|
||||||
attach_function :puts, [:string], :int
|
attach_function :puts, [:string], :int
|
||||||
end
|
end
|
||||||
|
|
||||||
MyLib.puts(["Hello world"])
|
MyLib.puts(["Hello World from C stdlib"])
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|||||||
Reference in New Issue
Block a user