Daniel Sopel
Daniel Sopel

Reputation: 3733

Prolog- Loading A Library from a File

The Sicstus manual says to use this to load a library: use_module(library(Package)). This works in Prolog on the command line, but I can't find out how to load a library from a Prolog source file. When I include "use_module(library(Package))." in my .pl file, I get a permission error: cannot redefine built_in use_module/1.

Upvotes: 6

Views: 2976

Answers (1)

user206428
user206428

Reputation:

Try using a directive, such as:

:- use_module(library(Package)).

...at the top of your file, where Package is the atom identifying the library module you want to load.

Upvotes: 9

Related Questions