LambdaBeta
LambdaBeta

Reputation: 1505

Ada Compilation Print full path

Simple question. I am compiling an ada program with gnat. The gcc command ends up looking like gcc -c -Ia -Ibunch -Iof -Iincludes -I- -o /some/object/file.o /some/source/file.adb however the error format consists of just file.adb:line:offset: problem.

Is there any way to get GNAT make or gcc to print the full path to the file in its errors, as specified on the command line? IE: to get /some/source/file.adb:line:offset: problem.

I know that with the -gnatv one could argue that it prints the full path, but I want something significantly less verbose than that.

Upvotes: 1

Views: 510

Answers (1)

Jean-François Fabre
Jean-François Fabre

Reputation: 140316

you need -gnatef option:

-gnatef Display full source path name in brief error messages.

gcc -gnatef -c %CD%\file.adb
C:\DATA\jff\data\python\stackoverflow\file.adb:1:01: "procedure" expected

https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gnat_ugn_unw/Switches-for-gcc.html

Upvotes: 4

Related Questions