Added example of using multiple params

This commit is contained in:
Josh Nussbaum
2016-06-13 02:19:17 -04:00
parent d23c9601c9
commit 57222c8026

View File

@@ -2,6 +2,8 @@ defmodule MyLib do
use FFI.Library, name: "libstdc++.so.6" use FFI.Library, name: "libstdc++.so.6"
attach_function :puts, [:string], :int attach_function :puts, [:string], :int
attach_function :printf, [:string, :int], :int
end end
MyLib.puts("Hello World from C stdlib") MyLib.puts("Hello World from C stdlib")
MyLib.printf("Random number: %d", :random.uniform(10))