module

DL::Importer

v1_9_3_125 - Show latest stable

DL::Importer includes the means to dynamically load libraries and build modules around them including calling extern functions within the C library that has been loaded.

Example

require 'dl'
require 'dl/import'

module LibSum
  extend DL::Importer
  dlload './libsum.so'
  extern 'double sum(double*, int)'
  extern 'double split(double)'
end

Included modules

  • DL
  • DL::CParser

Files

  • ext/dl/lib/dl/import.rb