install ffi. linux distros have packages.....so on ubuntu apt-get install ffi...
then here is the module code as well as sample scriptmodule LibMylib extend FFI::Library ffi_lib "libmylib.so" attach_function :MYLIB_helloWorld, [], :void endthen your script. make sure libmylib is replaced with whatever u named the module file above
require 'ffi' require 'libmylib' LibMylib.MYLIB_helloWorld()
No comments:
Post a Comment