Jan, thank you very much for your fast response!
This was very helpful for me.
I have another (may be related) problem:
I have a 2 lines Prolog file
:- writeln('program started') .
main :- writeln('done').
called test.pl . When I try to compile this program in the CMD.exe shell provided under Parallels Desktop, it compiles correctly
> swipl --goal=main -o test39.exe -c test.pl
program started
% Disabled autoloading (loaded 27 files)
% Disabled autoloading (loaded 2 files)
% Disabled autoloading (loaded 0 files)
However, here the shell hangs,
i.e., I can not stop the process using ^C,
I can only close the CMD.exe window
The executable is produced correctly and is runnable.
Nevertheless, I could be more productive, if the shell would not hang.
However, if I change my test program to
:- writeln('program started') .
main :- undefined_procedure .
the compilation process generates an executable as before and blocks after compilation as before. But now running the executable in a new window produces not only the desired error message, i.e.
ERROR: -g user:main: Unknown procedure: undefined_procedure/0
ERROR: In:
ERROR: [10] undefined_procedure
ERROR: [8] catch(user:main,error(existence_error(procedure,...),context(...,_2582)),'$toplevel':true) at c:/program files/swipl8.3.9/boot/init.pl:528
ERROR: [7] catch_with_backtrace(user:main,error(existence_error(procedure,...),context(...,_2646)),'$toplevel':true) at c:/program files/swipl8.3.9/boot/init.pl:578
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.
but the process also blocks afterwards, i.e., ^C does not stop the process, and I have to close the CMD.exe window , and must open a new CMD.exe window before I can run the test again.
For both, for the compilation step and for the execution step, I would prefer a solution that does not block the CMD.exe window if an error occurs, i.e., where I could return to the CMD.exe shell and continue testing.
Is there an easy way out?
I appreciate any advice.