I’m using: SWI-Prolog version (threaded, 64 bits, version 7.6.4)
I want the code to: use the predicate current_directory/1
But what I’m getting is:
ERROR: Undefined procedure: file_systems:current_directory/1
My code (currently, after many experiments and changes) looks like this:
test :-
file_systems:current_directory(CD),
write(CD).
Some explanation: I keep getting errors of “undefined procedures” (if I remember correctly), in other words, the interpreter does not seem to find the definitions of the predicates I want to use.
It is quite probable that I am making a stupid systematic mistake I fail to see, but anyway, nothing seems to work. I have tried use_module(library(file_systems)), and got the message that this library cannot be found. I have tried the predicate with and without a module specifier in front. the whole code within and without a module itself, I have tried the same on two different computers. Nothing seems to work, and I am half expecting a hint towards a very stupid and embarrassing mistake on my side, given that I am not a beginner, but a SWIPL user of decades. So please, enlighten/embarrass me if you can. Thanks in advance!