• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

12.2.3 library(shlib): Utility library for loading foreign objects (DLLs, shared objects)
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Linking Foreign Modules
          • library(shlib): Utility library for loading foreign objects (DLLs, shared objects)
            • use_foreign_library/1
            • use_foreign_library/2
            • compat_arch/2
            • load_foreign_library/1
            • load_foreign_library/2
            • unload_foreign_library/1
            • unload_foreign_library/2
            • current_foreign_library/2
            • reload_foreign_libraries/0
    • Packages
Availability::- use_module(library(shlib)).(can be autoloaded)
Source[det]load_foreign_library(:FileSpec)
[det]load_foreign_library(:FileSpec, +Options:list)
Load a shared object or DLL. After loading the Entry function is called without arguments. The default entry function is composed from =install_=, followed by the file base-name. E.g., the load-call below calls the function install_mylib(). If the platform prefixes extern functions with =_=, this prefix is added before calling. Options provided are below. Other options are passed to open_shared_object/3.
install(+Function)
Installation function to use. Default is default(install), which derives the function from FileSpec.
    ...
    load_foreign_library(foreign(mylib)),
    ...
FileSpec is a specification for absolute_file_name/3. If searching the file fails, the plain name is passed to the OS to try the default method of the OS for locating foreign objects. The default definition of file_search_path/2 searches <prolog home>/lib/<arch> on Unix and <prolog home>/bin on Windows.
See also
use_foreign_library/1,2 are intended for use in directives.
ClioPatria (version V3.1.1-51-ga0b30a5)