B7014: no main subprogram, or several
Catalog status: active. Default severity: error. Stable name: no-main-subprogram. Family: Driver and session failures.
veradic run and veradic build make a program, which starts at its main subprogram: a library procedure without parameters that no other unit names. When the files hold none (a package alone, or only functions), there is nothing to run; when they hold several, Verada does not guess which one is meant and names them all.
Example (Vada)
-- bounded.vadb: a package body, and no procedure to run
package body Bounded is
...
end Bounded;$ veradic run bounded.vadb
error[B7014]: the program has no main subprogram to run
Example (Varc)
// first.va and second.va each hold a `fn main()`, both in the project's sources
What to do
Add a main subprogram, procedure Main is ... end Main; in main.vadb (Varc fn main() in main.va), and name its file. When the sources hold several programs, run or build one of them by naming its file alone, or keep the others out of the project's source directories. veradic check and veradic prove take a program without a main subprogram.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See driver and session failures, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.