Search code examples
gnu-prolog

Can't compile in VsCode (Language is Prolog)


I was trying to compile a code, in vsCode and using linux, written in prolog but the error "Error trying to execute as: No such file or directory compilation failed" keeps apearing even though I have de program (thats called pni.pl) in the directory and the terminal is executing in the directory that the program is in.

Does anyone have an idea of what the problem is?

enter image description here

I tried to reset Vscode and the pc, tried opening again the terminal in the directory and nothing worked.


Solution

  • GNU Prolog gplc command is used to generate executables. To load and run your code in the GNU Prolog interpreter, try:

    $ gprolog --consult-file pni.pl