Skip to content

Loading files from other .plg files requires path relative to executable #19

@fairlight1337

Description

@fairlight1337

When loading the GDA Prolog Standard Library, subsequent files loaded from those files require the same relative path (relative to the binary of the program loading the library).

prolog_tool loads the stdlib from ../data/lib/std/main.plg. In main.plg there needs to be this line to properly include math.plg residing in the same directory:

(load "../data/lib/std/math.plg")

Ideally, it would only require this:

(load "math.plg")

This can be done by cutting the original file's relative path from its filename, and appending the now-to-load file to that path.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions