I wasted a whole day on this and can't find a solution. As Google doesn't supply any other questions like this, I'm sure that I must be doing something wrong.
I have a fresh full install of swi-prolog 8.2.3.1 on windows 10. I made sure the graphic options where selected. There is an xpce folder in the main swipl folder. When I try to load the xpce lib into prolog I get the following error:
?- [library('pce')].
ERROR: source_sink `library(pce)' does not exist
ERROR: In:
ERROR: [20] throw(error(existence_error(source_sink,...),_8462))
ERROR: [16] '$resolve_source_path'(library(pce),_8494,[expand(true)]) at c:/program files/swipl/boot/init.pl:2315
ERROR: [15] '$load_file'(library(pce),user,[expand(true)]) at c:/program files/swipl/boot/init.pl:2289
ERROR: [9] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
I tried to consult a file with :- use_module(library(pce)).
in it and get the same error. I have no idea how to proceed. It works just fine with ubunutu on wsl on the same machine, but without any graphical interface, it does only help to make sure the commands are correct.
Further information on the outcome of @david-tonhofer's solution:
I have this file in "C:\Program Files\swipl\xpce\prolog\lib". So I tried the folliwing:
?- file_search_path(library,X).
X = app_config(lib) ;
X = swi(library) ;
X = swi(library/clp) ;
false.
2 ?- assertz(file_search_path(library,pce('prolog/lib'))).
true.
3 ?- file_search_path(library,X).
X = app_config(lib) ;
X = swi(library) ;
X = swi(library/clp) ;
X = pce('prolog/lib').
4 ?- file_search_path(library,pce('prolog/lib')).
true.
5 ?- file_search_path(pce,X).
false.
6 ?- assertz(file_search_path(pce,'C:/Program Files/swipl/xpce/')).
true.
7 ?- file_search_path(pce,X).
X = 'C:/Program Files/swipl/xpce/'.
8 ?- use_module(library(pce)).
true.