Sublime Forum

Weird errors when trying to compile and run program

#1

Hello! I want o compile and run my Pascal program. I have the following PascalABC.NET.sublime-build build system written:

{
    "shell_cmd": "pabcnetcclear.exe \"$file_path/$file_name.pas\" && mono \"$file_path/$file_name.exe\"",
    "selector": "source.pascal"
}

But when I type Ctrl+B I obtain the following output:

/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas: line 1: uses: command not found
/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas: line 2: uses: command not found
/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas: line 4: begin: command not found
/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas: line 6: syntax error near unexpected token `|'
/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas: line 6: ` (head) | value: 0 |    | value: 1 |           | value: 9 | '
[Finished in 21ms with exit code 2]
[cmd: ['/bin/bash', '/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas']]
[dir: /home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures]
0 Likes

#2

This part of the error diagnostic shows you what command was executed:

[Finished in 21ms with exit code 2]
[cmd: ['/bin/bash', '/home/emilyseville7cfg/Documents/mine/pascal/data-structures/Singly linked structures/Singly linked list (app).pas']]

Your build system uses shell_cmd and is running pabnetccleat.exe but the diagnostic shows that it’s using cmd and executing /bin/bash. The error messages you’re seeing are most likely from bash itself trying to interpret your Pascal program.

Make sure that the build selected in Tools > Build System is either the one you created, or Automatic.

0 Likes